Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #36269

Re: Problem with Unicode char in Python 3.3.0

From Peter Otten <__peter__@web.de>
Subject Re: Problem with Unicode char in Python 3.3.0
Date 2013-01-06 18:03 +0100
Organization None
References <nobody-672426.17430906012013@news.free.fr>
Newsgroups comp.lang.python
Message-ID <mailman.174.1357491789.2939.python-list@python.org> (permalink)

Show all headers | View raw


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
>>> "\U0001D11E"
'𝄞'

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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