Short questions wrt Python & Unicode

Fredrik Lundh fredrik at pythonware.com
Fri Jun 9 09:08:51 EDT 2006


KvS wrote:

>>>> s=u"\u0040\u0166\u00e6"
>>>> s
> u'@\u0166\xe6'
> 
> (does this latter \xe6 have to do with the internal representation of
> unic. objects, maybe with this  UCS-2 encoding?)

no, it's simply the shortest way to represent U+00E6 as Python Unicode 
string literal, when limited to ASCII only.

</F>




More information about the Python-list mailing list