You can read a utf8 encodec file with codecs.open too. http://docs.python.org/library/codecs.html
Gonzalo On Mon, Aug 13, 2012 at 5:23 PM, Alan Jhonn Aguiar Schwyn < alan...@hotmail.com> wrote: > I have problems too.. > > I load the strings from a file, and have that problems (even the file is > UTF-8). > > My solution: when load a string, convert it: > > name_converted = unicode(name, 'UTF-8') > > > From: martin.langh...@gmail.com > > Date: Mon, 13 Aug 2012 16:00:31 -0400 > > To: humi...@gmail.com > > CC: sugar-devel@lists.sugarlabs.org > > Subject: Re: [Sugar-devel] Unicode strings in translations > > > > > On Mon, Aug 13, 2012 at 12:35 PM, Manuel Kaufmann <humi...@gmail.com> > wrote: > > > To get Unicode strings from gettext I had to put these lines in my > > > lesssonscreen.py file: > > > > > > import gettext > > > gettext.install('po', unicode=True) > > > > Awright. Seems like gettext hasn't realized that it's 2012 and > > defaults to using codepages. > > > > I'd vote for gettext.install('po', unicode=True) everywhere. All Sugar > > builds have been in the utf-8 era, so this should work even in > > extremely old builds. > > > > > > > > > > m > > -- > > martin.langh...@gmail.com > > mar...@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 > > _______________________________________________ > > Sugar-devel mailing list > > Sugar-devel@lists.sugarlabs.org > > http://lists.sugarlabs.org/listinfo/sugar-devel > > _______________________________________________ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel > >
_______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel