for loop question

Robert Dailey rcdailey at gmail.com
Wed Oct 10 17:03:39 EDT 2007


I've tried everything to make the original CSV module work. It just doesn't.
I've tried UTF-16 encoding (which works fine with codecs.open()) but when I
pass in the file object returned from codecs.open() into csv.reader(), the
call to reader.next() fails because it says something isnt' in the range of
range(128) or something (Not really an expert on Unicode so I'm not sure of
the meaning). I would use CSV if I could!

On 10/10/07, Carsten Haese <carsten at uniqsys.com> wrote:
>
> On Wed, 2007-10-10 at 15:27 -0500, Robert Dailey wrote:
> > I'm using CSV for localization in a game I'm involved with.
>
> That doesn't tell me why you think you need a CSV parser that supports
> Unicode. There is no such thing as a Unicode file. The file contains a
> stream of octets that represent some encoding of Unicode code points. If
> the encoding is chosen properly, such as UTF-8, the standard CSV parser
> should be able to parse the resulting stream.
>
> -Carsten
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071010/96b8d20e/attachment.html>


More information about the Python-list mailing list