[Eric] Unicode issue
Detlev Offenbach
detlev at die-offenbachs.de
Tue Oct 6 18:08:02 BST 2009
Hi,
eric is doing a little trickery save a method of the sys module to set the
default encoding and uses that saved method later on to set the encoding to
the configured value (default utf8). The trickery code is included in
eric4.pth.
Without this, strings (str) are ASCII encoded and one has to use the
encode("utf8") and the respective decode methods.
Regards,
Detlev
On Dienstag, 6. Oktober 2009, jonnobleuk at gmail.com wrote:
> Hi,
>
> I'm developing an app that uses Unicode in QTreeWidgetItems. When I run my
> app via Eric's "Run Project" feature I can use the unicode to write and
> read the WTreeWidgetItem's with no issue.
>
> However, when I run my app natively I can no longer read the unicode and I
> am shown errors like this
>
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in
> position 2: ordinal not in range(128)
>
> What is Eric doing to prevent this?
>
> Cheers
>
> Jon
> _______________________________________________
> Eric mailing list
> Eric at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/eric
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the Eric
mailing list