Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.python

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 02-10-2009, 12:44 PM
durumdara
Guest
 
Posts: n/a
Default Re: Cheetah and hungarian charset...

Hi!

Ok, I forget to set encodings.

from Cheetah.Template import Template
d = {'a' : 'almás'}
tp = Template("# encoding: iso-8859-2\nhello world éááá ${d['a']}!",
searchList = {'d': d})
print tp

sys.exit()

This code is working for me in Windows.

dd

2009.02.05. 16:21 keltezéssel, durumdara írta:
> Hi!
>
> I wanna ask that have anyone some exp. with Cheetah and the non-ascii
> chars?
>
> I have a site. The html template documents are saved in ansi format,
> psp liked them.
> But the cheetah parser makes ParseError on hungarian characters, like
> "á", "é", "í", etc. When I remove them, I got good result, but I don't
> want to remove them all...
>
> I cannot parse them. Please help me, how to force cheetah to eat them
> all?
>
> Thanks for your help:
> dd
>


Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 10:25 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.