Cheetah and hungarian charset...
durumdara
durumdara at gmail.com
Tue Feb 10 08:44:25 EST 2009
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
>
More information about the Python-list
mailing list