'ur' to have Python use the Raw-Unicode-Escape encoding : Unicode : Language Basics : Python examples (example source code) Organized by topic

C++
PHP
Python
Python Home »  Language Basics   » [  Unicode  ]  Screenshots 
 



'ur' to have Python use the Raw-Unicode-Escape encoding




#It will only apply the above \uXXXX conversion if there is an uneven number of 
#backslashes in front of the small 'u'.

print ur'Hello\u0020World !'

print ur'Hello\\u0020World !'


           
       
Related examples in the same category
1.  Mixed String type: normal string and unicode Mixed String type: normal string and unicode
2.  Convert string: unicode to normal string Convert string: unicode to normal string
3.  Convert string:normal to unicode Convert string:normal to unicode
4.  Creating Unicode strings in Python Creating Unicode strings in Python
5.  Small 'u' in front of the quote indicates that an Unicode string Small 'u' in front of the quote indicates that an Unicode string
6.  Built-in function unicode() provides access to all registered Unicode codecs Built-in function unicode() provides access to all registered Unicode codecs
7.  Convert a Unicode string into an 8-bit string
8.  Use the unicode() function produce a corresponding Unicode string from a specific encoding
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.