Message280761
iso6937.py:
> # from utf-8 to iso6937
> def iso6937_encode(input,errors,encoding_map):
Wait, is this code for Python 3? Decode from UTF-8 and encode to ISO-6937 in the same function seems strange to me.
I expected that the codec only implements two functions: encode text (unicode) to ISO-6937 (bytes), decode bytes from ISO-6937 to text.
Since the encoding is non trivial (multibyte), if we decide to add it, I suggest to require unit tests. I would like to see unit tests on multibyte strings, to check how the error handler is handled.
--
In general, I would prefer to not embed too many codecs in Python, it has a little cost to maintain these codecs.
My rule is more to only added encodings used (in practice) as locale encodings. |
|
Date |
User |
Action |
Args |
2016-11-14 12:03:26 | vstinner | set | recipients:
+ vstinner, lemburg, loewis, serhiy.storchaka, xiang.zhang, John Helour, mdk |
2016-11-14 12:03:26 | vstinner | set | messageid: <1479125006.56.0.170693383599.issue24339@psf.upfronthosting.co.za> |
2016-11-14 12:03:26 | vstinner | link | issue24339 messages |
2016-11-14 12:03:26 | vstinner | create | |
|