Message11631
Actually, non-ascii text is ok unless you supply it as a unicode. In that case, we buffer up the Java chars internally (UTF-16), and then try to treat this String as bytes, hence the error. If the client supplies a unicode object, I believe we should be encoding it with the default encoding. In the same circumstances, CPython says something like:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 12: ordinal not in range(128)
So the StringBuilder can stay, but we ought to encode unicode objects as they arrive, if only so that we can fail the way CPython does. |
|
Date |
User |
Action |
Args |
2017-10-25 16:03:32 | jeff.allen | set | messageid: <1508947412.01.0.213398074469.issue2632@psf.upfronthosting.co.za> |
2017-10-25 16:03:32 | jeff.allen | set | recipients:
+ jeff.allen |
2017-10-25 16:03:31 | jeff.allen | link | issue2632 messages |
2017-10-25 16:03:31 | jeff.allen | create | |
|