encoding

Christian Heimes lists at cheimes.de
Mon Sep 1 18:15:19 EDT 2008


Gandalf wrote:
> if i want to print utf-8 string i should writre:
> 
> print u"hello word"
> 
> but what happen if i want to print variable?

u"hello world" is *not* an utf-8 encoded string. It's a unicode string. 
I suggest you read http://www.joelonsoftware.com/articles/Unicode.html

Christian




More information about the Python-list mailing list