Re: Write Unicode str as utf-8

2005-02-14 Thread Erik Max Francis
kent sin wrote: Python support unicode, but some library don't. Write is one of them. When writing a csv file, The rows contains numbers and unicode str. It is a little pain to first convert all unicode str to utf-8 before writing the row. Why? S = U.encode('utf-8') Are there anyway I can

Write Unicode str as utf-8

2005-02-14 Thread kent sin
Python support unicode, but some library don't. Write is one of them. When writing a csv file, The rows contains numbers and unicode str. It is a little pain to first convert all unicode str to utf-8 before writing the row. Are there anyway I can patch python such that It will convert the unicod