[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: Mysterious xml.sax Encoding Exception

Stefan Behnel

2/2/2008 4:45:00 PM

Hi,

Peck, Jon top-posted:
>> Stefan Behnel wrote:
>> No. The internal representation of unicode characters is platform
>> dependent, and is either 2 or 4 bytes per character. If you want UTF-16,
>> use ".encode()".
>
> Thanks. The two users having the problem are on Windows, so I think Python
> Unicode is utf-16 in that case.

That's not what I meant with "platform dependent". You can actually decide
that at built time. You cannot rely on a specific internal encoding of unicode
strings.

Stefan