Michael Osipov <1983-01...@gmx.net> added the comment:

I think you are absoltely right.

> In any case, it seems to be broken for any system that does not have UTF-8 as 
> default.

You likely mean ASCII. Python assumes that LANG=C is ASCII which is not the 
case for AIX and HP-UX.

Your patch looks reasonable, I will try this on Monday. The problem is that 
there is no roman8 codec in Python. Maybe ISO-8859-1 will do it for the test, 
but I am still eager to add one.

> I mention this because it seems neither roman8 nor roman9 have 'official' iso 
> names or alias (correct me if I am wrong).

There are no ISO names because this is not an ISO encoding. This is an HP 
invention aka hp-roman8 (roman8, ibm-1051, r8, Cp1051).

Edit: there is roman8 support: 
https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Lib/encodings/hp_roman8.py
 as well as aliases.

There are a few aliases missing: cp1051, ibm1051 and hp-roman8. This needs an 
additonal PR.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34403>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to