Re: Python encoding question

2011-02-25 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Marc Muehlfeld wrote: Hi, TEST = cursor.fetchone() print TEST[0] print TEST When I run this script It prints me: München ('M\xc3\xbcnchen',) Why is the Umlaut of TEST[0] printed and not from TEST? When you print a string, it simply prints it, control character

Re: Python encoding question

2011-02-25 Thread Jean-Michel Pichavant
Marc Muehlfeld wrote: Hi, I'm doing my first steps with python and I have a problem with understanding an encoding problem I have. My script: import os os.environ["NLS_LANG"] = "German_Germany.UTF8" import cx_Oracle connection = cx_Oracle.Connection("username/password@SID") cursor = connectio

Python encoding question

2011-02-25 Thread Marc Muehlfeld
Hi, I'm doing my first steps with python and I have a problem with understanding an encoding problem I have. My script: import os os.environ["NLS_LANG"] = "German_Germany.UTF8" import cx_Oracle connection = cx_Oracle.Connection("username/password@SID") cursor = connection.cursor() cursor.execu

Re: Python encoding

2008-08-19 Thread Joan Pallarès
Sorry, The problem is the OblecjtListView doesn't show some characters correctly. In the image attached, in the "partidos list" in the grey line, where a square is showed it must be a Ç And in the second line where a | is showed it should be a ª Why this happen? maybe OLV doesn`t manage well the

Re: Python encoding

2008-08-18 Thread Fredrik Lundh
Joan Pallarès wrote: I tried to create unicode in this two ways: self.nombreLocal = unicode(nombreLocal) self.nombreLocal = unicode(nombreLocal, 'iso-8859-1') the "unicode" constructor takes a string of bytes in some known character encoding, and decodes them into a Unicode string. if you

Python encoding

2008-08-18 Thread Joan Pallarès
I have problems encoding some team names. Python can't work with: ª, é, ç. I tried to create unicode in this two ways: self.nombreLocal = unicode(nombreLocal) self.nombreLocal = unicode(nombreLocal, 'iso-8859-1') But there is always one character that can't be encoded!! unicode doesn`t enco

Re: python encoding bug?

2005-12-31 Thread Benjamin Niemann
same happens if I use 'latin-1' instead of 'iso8859_1'. > > This caught me by surprise, since I was doing some heuristics guessing > string encodings, and 'iso8859_1' gave no errors even if the input > encoding was different. > > Is this a known behaviour, or

Re: python encoding bug?

2005-12-31 Thread Vincent Wehren
was doing some heuristics guessing | string encodings, and 'iso8859_1' gave no errors even if the input | encoding was different. | | Is this a known behaviour, or I discovered a terrible unknown bug in python encoding | implementation that should be immediately reported a

python encoding bug?

2005-12-30 Thread garabik-news-2005-05
ics guessing string encodings, and 'iso8859_1' gave no errors even if the input encoding was different. Is this a known behaviour, or I discovered a terrible unknown bug in python encoding implementation that should be immediately reported and fixed? :-) happy new year, --