Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36271
| From | marduk <marduk@python.net> |
|---|---|
| Subject | Re: Problem with Unicode char in Python 3.3.0 |
| Date | 2013-01-06 12:10 -0500 |
| References | <nobody-672426.17430906012013@news.free.fr> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.175.1357492817.2939.python-list@python.org> (permalink) |
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 > You probably meant: >>> '\U0001d11e' For that synax you must use either '\uXXXX' or '\UXXXXXXXX' (i.e. specify either 4 or 8 hex digits). http://docs.python.org/2/howto/unicode#unicode-literals-in-python-source-code
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Problem with Unicode char in Python 3.3.0 Franck Ditter <nobody@nowhere.org> - 2013-01-06 17:43 +0100
Re: Problem with Unicode char in Python 3.3.0 Peter Otten <__peter__@web.de> - 2013-01-06 18:03 +0100
Re: Problem with Unicode char in Python 3.3.0 marduk <marduk@python.net> - 2013-01-06 12:10 -0500
Re: Problem with Unicode char in Python 3.3.0 Franck Ditter <nobody@nowhere.org> - 2013-01-07 13:57 +0100
Re: Problem with Unicode char in Python 3.3.0 Chris Angelico <rosuav@gmail.com> - 2013-01-08 00:04 +1100
Re: Problem with Unicode char in Python 3.3.0 Terry Reedy <tjreedy@udel.edu> - 2013-01-07 08:12 -0500
Re: Problem with Unicode char in Python 3.3.0 Terry Reedy <tjreedy@udel.edu> - 2013-01-08 03:40 -0500
csiph-web