[stringtemplate-interest] [patch] Unicode: One more hack

Benjamin Niemann pink at odahoda.de
Mon Aug 11 05:12:40 PDT 2008


Hi Roman,

I've just started 'unicodifying' PyST along with updating it to 3.2.
Will hopefully have a first beta by next weekend.

-Ben


On Sun, Aug 10, 2008 at 4:52 PM, Roman Odaisky <roma at qwertty.com> wrote:
> Greetings,
>
>> Attached patch is all one seemingly needs to use UTF-8 template files.
>
> That works for $x$², but not for $x:{$it$²}$.
>
> I had to replace all mentions of __str__ and str() by __unicode__ and
> unicode(), that did the job.
>
> I did it by two simple commands:
> sed -i -e 's/\<__str__\>/__unicode__/g' ./**/*.py
> sed -i -e 's/\<str[(]/unicode(/g' ./**/*.py
>
> I also attach the result as a patch.
>
> Of course, all of this is one big hack, the person responsible for PyST should
> upgrade it for Unicode in a more sensible manner.
>
> --
> HTH
> Roman.
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
>
>


More information about the stringtemplate-interest mailing list