Re: Problem with Unicode char in Python 3.3.0

2013-01-08 Thread Terry Reedy
On 1/7/2013 8:12 AM, Terry Reedy wrote: On 1/7/2013 7:57 AM, Franck Ditter wrote: <<< print('\U0001d11e') Traceback (most recent call last): File "", line 1, in print('\U0001d11e') UnicodeEncodeError: 'UCS-2' codec can't encode character '\U0001d11e' in position 0: Non-BMP character no

Re: Problem with Unicode char in Python 3.3.0

2013-01-07 Thread Terry Reedy
On 1/7/2013 7:57 AM, Franck Ditter wrote: <<< print('\U0001d11e') Traceback (most recent call last): File "", line 1, in print('\U0001d11e') UnicodeEncodeError: 'UCS-2' codec can't encode character '\U0001d11e' in position 0: Non-BMP character not supported in Tk The message comes fro

Re: Problem with Unicode char in Python 3.3.0

2013-01-07 Thread Chris Angelico
On Mon, Jan 7, 2013 at 11:57 PM, Franck Ditter wrote: > <<< print('\U0001d11e') > Traceback (most recent call last): > File "", line 1, in > print('\U0001d11e') > UnicodeEncodeError: 'UCS-2' codec can't encode character '\U0001d11e' > in position 0: Non-BMP character not supported in Tk Th

Re: Problem with Unicode char in Python 3.3.0

2013-01-07 Thread Franck Ditter
In article , marduk wrote: > On Sun, Jan 6, 2013, at 11:43 AM, Franck Ditter wrote: > > Hi ! > > I work on MacOS-X Lion and IDLE/Python 3.3.0 > > I can't get the treble key (U1D11E) ! > > > > >>> "\U1D11E" > > SyntaxError: (unicode error) 'unicodeescape' codec can't > > decode bytes in positio

Re: Problem with Unicode char in Python 3.3.0

2013-01-06 Thread marduk
On Sun, Jan 6, 2013, at 11:43 AM, Franck Ditter wrote: > Hi ! > I work on MacOS-X Lion and IDLE/Python 3.3.0 > I can't get the treble key (U1D11E) ! > > >>> "\U1D11E" > SyntaxError: (unicode error) 'unicodeescape' codec can't > decode bytes in position 0-6: end of string in escape sequence >

Re: Problem with Unicode char in Python 3.3.0

2013-01-06 Thread Peter Otten
Franck Ditter wrote: > I work on MacOS-X Lion and IDLE/Python 3.3.0 > I can't get the treble key (U1D11E) ! > "\U1D11E" > SyntaxError: (unicode error) 'unicodeescape' codec can't > decode bytes in position 0-6: end of string in escape sequence > > How can I display musical keys ? Try >>> "

Problem with Unicode char in Python 3.3.0

2013-01-06 Thread Franck Ditter
Hi ! I work on MacOS-X Lion and IDLE/Python 3.3.0 I can't get the treble key (U1D11E) ! >>> "\U1D11E" SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-6: end of string in escape sequence How can I display musical keys ? Thanks, franck -- http://mail.pytho

Re: WinXP, Python3.1.2, dir-listing to XML - problem with unicode file names

2010-04-03 Thread Mark Tolonen
"kai_nerda" wrote in message news:hp69ri+a...@egroups.com... Hi, OS = Windows XP (German language) Python = 3.1.2 I need to write a directory listing into a XML file. And after hours of trying and searching i have no clue. My main problem is that the file and folder names can have characters

WinXP, Python3.1.2, dir-listing to XML - problem with unicode file names

2010-04-03 Thread kai_nerda
Hi, OS = Windows XP (German language) Python = 3.1.2 I need to write a directory listing into a XML file. And after hours of trying and searching i have no clue. My main problem is that the file and folder names can have characters of different languages like German, Turkish, Russian, maybe else

Strange MySQL / sqlite3 Problem with unicode

2009-12-03 Thread Hans Müller
I have a strange unicode problem with mySQL and sqlite. In my application I get a table as a sqlite table which is being compared to an existing mySQL Table. The sqlite drive returns all strings from the table as a unicode string which is Ok. The mysql drive returns all strings as utf-8 coded

Re: problem with unicode

2008-04-25 Thread hdante
On Apr 25, 8:15 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > I don't know what to do. I just want to concatenate two string where > apparently one is a binary string, the other one is a unicode string > and I always seem to get this error. Please explain better what you want to do with

Re: problem with unicode

2008-04-25 Thread John Machin
On Apr 26, 6:42 am, Bjoern Schliessmann wrote: > John Machin wrote: > > On Apr 25, 10:01 pm, Bjoern Schliessmann >> >>> media="x???[?" > >> >>> print repr(media.decode("utf-8")) > > >> u'x\u30ef\u30e6\u30ed[\u30e8' > > (dang, KNode doesn't autodetect encodings ...) > > > But that_unicode_string.e

Re: problem with unicode

2008-04-25 Thread Bjoern Schliessmann
John Machin wrote: > On Apr 25, 10:01 pm, Bjoern Schliessmann > >>> media="x???[?" >> >>> print repr(media.decode("utf-8")) >> >> u'x\u30ef\u30e6\u30ed[\u30e8' (dang, KNode doesn't autodetect encodings ...) > But that_unicode_string.encode("utf-8") produces > 'x\xe3\x83\xaf\xe3\x83\xa6\xe3\x83\xa

Re: problem with unicode

2008-04-25 Thread Matt Nordhoff
[EMAIL PROTECTED] wrote: > Hi everybody, > > I'm using the win32 console and have the following short program > excerpt > > # media is a binary string (mysql escaped zipped file) > >>> print media > xワユロ[ヨ... > (works) > >>> print unicode(media) > UnicodeDecodeError: 'ascii' codec can't decode

Re: problem with unicode

2008-04-25 Thread John Machin
On Apr 25, 10:01 pm, Bjoern Schliessmann wrote: > [EMAIL PROTECTED] wrote: > > # media is a binary string (mysql escaped zipped file) > > print media > > x???[? ... > > (works) > > Which encoding, perhaps UTF-8 or ISO8859-1? > > print unicode(media) > > UnicodeDecodeError: 'ascii' codec

Re: problem with unicode

2008-04-25 Thread John Machin
On Apr 25, 9:15 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi everybody, > > I'm using the win32 console and have the following short program > excerpt > > # media is a binary string (mysql escaped zipped file) > > >> print media > > xワユロ[ヨ ... > (works) > > >> print unicode(media) > > Un

Re: problem with unicode

2008-04-25 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > # media is a binary string (mysql escaped zipped file) > print media > x???[?... > (works) Which encoding, perhaps UTF-8 or ISO8859-1? print unicode(media) > UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in > position 1: ordinal not in range(128

problem with unicode

2008-04-25 Thread [EMAIL PROTECTED]
Hi everybody, I'm using the win32 console and have the following short program excerpt # media is a binary string (mysql escaped zipped file) >> print media xワユロ[ヨ... (works) >> print unicode(media) UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(12

wxGrid: Problem with unicode mathematical symbols

2006-12-20 Thread Massi
Hi everyone, I'm trying to build (on windows environment) a grid in which every cell contains a mathematical formula, the problem is the following: when I try to put in the cells some mathematical symbol (such as those for "belong to", "for all" or "exists") with the method SetCellValue I always se