[Sugar-devel] Unicode strings in translations

Martin Langhoff martin.langhoff at gmail.com
Wed Aug 15 10:11:48 EDT 2012


On Wed, Aug 15, 2012 at 9:48 AM, Daniel Narvaez <dwnarvaez at gmail.com> wrote:
> I think the reason this worked in gtk2 activities is that importing
> gtk had this side effect (it's in the pango module really)
>
>     /* set the default python encoding to utf-8 */
>     PyUnicode_SetDefaultEncoding("utf-8");

Oh, can you do that? Excellent. Perhaps it's a good idea to include
that in early-execution Sugar shell code, and in Sugar toolkit.

> Now I don't really like changing default encoding as a side effect but
> the simpler solution is probably to just reinstate that, either in

Perhaps inelegant if you were note expecting it. However, I think it
is a sane statement: all Python code in Sugar and activities is in
utf-8. Any strings are utf-8,even if we forget to add the "u"
prefix...

cheers,



m
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff


More information about the Sugar-devel mailing list