Problem with Unicode char in Python 3.3.0

Peter Otten __peter__ at web.de
Sun Jan 6 12:03:36 EST 2013


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





More information about the Python-list mailing list