[issue1606092] csv module broken for unicode

2009-11-25 Thread R. David Murray
R. David Murray added the comment: This is indeed fixed in Python 3. If someone wishes to step forward with patches for 2.7, they can reopen this bug, but I don't think it is worth the effort. -- nosy: +r.david.murray resolution: -> out of date stage: -> committed/rejected status: op

[issue1606092] csv module broken for unicode

2009-11-24 Thread Craig McQueen
Craig McQueen added the comment: I think I see now--it accepts Unicode input, but converts it back to bytes internally using the ASCII codec. So it works as long as the Unicode input contains on ASCII characters. That's a gotcha. It appears that it's been fixed in Python 3.x, judging by the doc

[issue1606092] csv module broken for unicode

2009-11-24 Thread Craig McQueen
Craig McQueen added the comment: Is this still an open bug? I have the following code: lookup = {} csv_reader = csv.reader(codecs.open(lookup_file_name, 'r', 'utf-8')) for row in csv_reader: lookup[row[1]] = row[0] And it "appears to work" (it runs) using Python 2.6.2. So h

[issue1606092] csv module broken for unicode

2009-11-24 Thread Craig McQueen
Changes by Craig McQueen : -- nosy: +cmcqueen1975 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue1606092] csv module broken for unicode

2008-09-10 Thread Mike Statkus
Mike Statkus <[EMAIL PROTECTED]> added the comment: Example of UnicodeWriter.writerow(self,row) presented in Python 2.5 Manual at section 9.1.5 (Examples on CSV module of standard library) does not correctly process rows containing not only strings, but also int type values, raising an attribute