[New-bugs-announce] [issue12178] csv writer doesn't escape escapechar
report at bugs.python.org
Wed May 25 20:27:10 CEST 2011
New submission from Eric Breck <ebreck at gmail.com>:
Consider the attached two files. A reader and writer with the same dialect parameters (escapechar \ quotechar " doublequote False) read, then write a CSV cell that looks like "C\\". It's written "C\". The problem is, when doublequote=False, the escapechar isn't used to escape itself, and the writer writes something that in the same dialect would be understood differently (\" isn't \ then end of string, it's an escaped quotechar within the string).
Execute python err.py first.csv to see.
title: csv writer doesn't escape escapechar
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file22112/pybug.zip
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce