Storing Non-ASCII Characters : Text Encode « Language Basics « Python






Storing Non-ASCII Characters

s = u'La Pe\xf1a'                                  

print s                                          

print s.encode('latin-1')                         


           
       








Related examples in the same category

1.Effects of Setting the Default Encoding
2.Russian encodeRussian encode