Re: unicode encoding problem

2005-05-11 Thread TZOTZIOY
On Thu, 28 Apr 2005 23:53:02 +0200, rumours say that "Martin v. Löwis" <[EMAIL PROTECTED]> might have written: >In theory, Python should look at sys.stdin.encoding when processing >the interactive source. In practice, various Python releases ignore >sys.stdin.encoding, and just assume it is Latin-

Re: unicode encoding problem

2005-04-28 Thread "Martin v. Löwis"
[EMAIL PROTECTED] wrote: > So how do I tell what encoding my unicode string is in, and how do I > retrieve that when I read it from a file? In interactive mode, you best avoid non-ASCII characters in a Unicode literal. In theory, Python should look at sys.stdin.encoding when processing the intera

unicode encoding problem

2005-04-28 Thread garykpdx
Every time I think I understand unicode, I prove I don't. I created a variable in interactive mode like this: s = u'ä' where this character is the a-umlaut that worked alright. Then I encoded it like this: s.encode( 'latin1') and it printed out a sigma (totally wrong) then I typed this: s.encod