Message11625
As reported in https://github.com/jythontools/jython/issues/90, an attempt to write non-ascii text via csv results in the infamous:
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value
Being old-school Python 2, this module thinks in bytes and leaves encoding to the user. By convention (?), the content of a CSV will be interpreted as UTF-8, so clients sensitive to the problem will supply encoded data. We reverse this philosophy in Python 3.
Almost certainly we should use a ByteBuffer where we presently use a StringBuilder since the file is in binary mode and the user should expect to encode the text before calling csv.writer.writerow(). |
|
Date |
User |
Action |
Args |
2017-10-21 07:16:14 | jeff.allen | set | recipients:
+ jeff.allen |
2017-10-21 07:16:14 | jeff.allen | set | messageid: <1508570174.74.0.213398074469.issue2632@psf.upfronthosting.co.za> |
2017-10-21 07:16:14 | jeff.allen | link | issue2632 messages |
2017-10-21 07:16:13 | jeff.allen | create | |
|