Problems with csv module

Fredrik Lundh fredrik at pythonware.com
Wed May 11 14:02:25 EDT 2005


Skip Montanaro wrote:

>     Fredrik> does the CSV format even support Unicode-encoded data streams?
>
> Based on the requests I've seen here and on the csv at mojam.com mailing list,
> it appears people are certainly generating CSV files which contain Unicode-
> encoded data.

in what encodings?

is the encoding specified inside the file?  if so, how?

(it should be noted that the phrase "Unicode-encoded data" that I
used doesn't make much sense, even in the original context.  what
I meant to say was that CSV, as far as I know, isn't defined as a
stream of Unicode character, but rather as a stream of bytes in an
ASCII-compatible encoding.  this means that you can use e.g. ISO-
8859-1 or UTF-8 for string values, but not that you can encode the
whole thing as, say UTF-16 or UCS-4).

</F>






More information about the Python-list mailing list