[issue24339] iso6937 encoding missing

STINNER Victor report at bugs.python.org
Mon Nov 14 07:03:26 EST 2016


STINNER Victor added the comment:

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.

----------
nosy: +haypo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24339>
_______________________________________


More information about the Python-bugs-list mailing list