On Oct 20, 3:16 am, rsoares <[email protected]> wrote: > Hi, > > Try put the following line on the top of every mako file (or the > parent file, if you are using template inheritance): > > # -*- coding: utf-8 -*- > > I think this should help rendering utf-8 content.
If I'm not mistaken, the purpose of that line is to indicate the content encoding of the Mako source file itself, and won't have any effect on rendered output. > On Oct 15, 7:38 am, Gopalakrishnan S > > <[email protected]> wrote: > > I run rss aggregator project and my site crashes whenever it meets the > > unusable chars it displays the feed text on the pylons site. The error > > falls back to mako template and I am getting errors like > > UnicodeDecodeError. > > > Does mako automatically converts strings to utf-8 conventions? Are > > there any way to do that? I think in the default Pylons setup, the Mako output encoding is ASCII (the UnicodeDecodeError traceback should tell you which codec is being used; something like "ascii codec cannot decode byte blah blah blah..."). You can change the default encoding in environment.py (IIRC). -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
