>> ----
>> return $m['HTML']('Привет');
>> ----
>> now:
>> ----
>> return $m['HTML']('\xd0\x9f\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82');
>> ----
> Ok, I looked in translator_proto.py sources and found following change:
> string constants now passed thru new 'uescape' function, which
> (intentionally) pass them thru repr().
more info: new code use 'pytranslator' instead of 'translator' module.
Looks like pytranslator doesn't process

# -*- coding: utf-8 -*-

line at the start of source file.
Translator 'parseFile' call produces ast

Const(u'\xd0\x9f\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82')

instead of (correct one)

Const(u'\u041f\u0440\u0438\u0432\u0435\u0442')

for unicode literal. First one is not actually a unicode, but undecoded
utf-8 value.

Seva

Reply via email to