> 2005/12/23, David Xiao <[EMAIL PROTECTED]>: > Hi Kuan: > > Thanks a lot! One more question here: How to write if I want > to > specify locale other than current locale? > > For example, running on Korea locale system, and try read a > UTF-8 file > that save chinese.
Use the encode method to translate the unicode object into whatever encoding you want. unicodeStr = ... print unicodeStr.encode('big5') Hope this helps, Carsten. -- http://mail.python.org/mailman/listinfo/python-list