Re: csv module and Unicode

2007-10-08 Thread Robert Dailey
Wow; I guess this is a REAL problem! I would have thought that something as common as Unicode CSV would have been supported by SOMEONE. On 10/5/07, Robert Dailey <[EMAIL PROTECTED]> wrote: > > Hi, > > According to the Python 2.5 documentation, Unicode is not supported > through the CSV module. Is

csv module and Unicode

2007-10-05 Thread Robert Dailey
Hi, According to the Python 2.5 documentation, Unicode is not supported through the CSV module. Is there some third-party CSV module I can use that has Unicode support? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: CSV module and UNICODE

2006-02-23 Thread Rudy Schockaert
Thanks a lot Skip. Sure that this will help. Learned two things: how to do it and to look at the docs for 2.5 also. These samples are not in the 2.4.2 reference guide. RudyOn 2/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Rudy> I'm having problems writing unicode to a csv file.Rud

Re: CSV module and UNICODE

2006-02-23 Thread skip
Rudy> I'm having problems writing unicode to a csv file. Rudy> I use the following code: ... Have you tried the example UnicodeReader and UnicodeWriter classes in the module documentation: http://www.python.org/dev/doc/devel/lib/node631.html While the csv module is 8-bit clean i

Re: CSV module and UNICODE

2006-02-23 Thread Rudy Schockaert
Forgot to mention that I work on Windows XP and Windows 2003.On 2/23/06, Rudy Schockaert <[EMAIL PROTECTED] > wrote:I'm having problems writing unicode to a csv file.I use the following code: -import codecsimport csvcsvfile = csv.writer(codecs.open('filename.csv','w+','utf-8

CSV module and UNICODE

2006-02-23 Thread Rudy Schockaert
I'm having problems writing unicode to a csv file.I use the following code:-import codecsimport csvcsvfile = csv.writer(codecs.open('filename.csv','w+','utf-8'))a = u'\xc9' csvfile.writerow([a,a]) -It fails with the message: UnicodeEncodeError: 'ascii

Re: csv module and unicode, when or workaround?

2005-03-12 Thread John Machin
Chris wrote: > hi, > thanks for all replies, I try if I can at least get the work done. > > I guess my problem mainly was the rather mindflexing (at least for me) > coding/decoding of strings... > > But I guess it would be really helpful to put the UnicodeReader/Writer > in the docs UNFORTUNATELY

Re: csv module and unicode, when or workaround?

2005-03-12 Thread Chris
hi, thanks for all replies, I try if I can at least get the work done. I guess my problem mainly was the rather mindflexing (at least for me) coding/decoding of strings... But I guess it would be really helpful to put the UnicodeReader/Writer in the docs thanks a lot chris -- http://mail.python

Re: csv module and unicode, when or workaround?

2005-03-12 Thread John Machin
Chris wrote: > hi, > to convert excel files via csv to xml or whatever I frequently use the > csv module which is really nice for quick scripts. problem are of course > non ascii characters like german umlauts, EURO currency symbol etc. The umlauted characters should not be a problem, they're all

Re: csv module and unicode, when or workaround?

2005-03-12 Thread Max M
Chris wrote: the current csv module cannot handle unicode the docs say, is there any workaround or is unicode support planned for the near future? in most cases support for characters in iso-8859-1(5) would be ok for my purposes but of course full unicode support would be great... It doesn't sup

Re: csv module and unicode, when or workaround?

2005-03-11 Thread Skip Montanaro
Chris> the current csv module cannot handle unicode the docs say, is Chris> there any workaround or is unicode support planned for the near Chris> future? Skip> True, it can't. Hmmm... I think the following should be a reasonable workaround in most situations: #!/usr/bin/en

Re: csv module and unicode, when or workaround?

2005-03-11 Thread Skip Montanaro
Chris> the current csv module cannot handle unicode the docs say, is Chris> there any workaround or is unicode support planned for the near Chris> future? True, it can't. Chris> obviously I am not a python pro, i did not even find the py Chris> source for the module, it seeme

csv module and unicode, when or workaround?

2005-03-11 Thread Chris
hi, to convert excel files via csv to xml or whatever I frequently use the csv module which is really nice for quick scripts. problem are of course non ascii characters like german umlauts, EURO currency symbol etc. the current csv module cannot handle unicode the docs say, is there any workaro