INADA Naoki <[email protected]> added the comment:
> But even so, I think this bug is still valid, as the lzh_TW does not exist in
> the lib at all.
Python doesn't have locale database, while have some aliases.
Python uses libc's locale.
This exception is raised because `_parse_localename` doesn't support
locale name without encoding.
In case of zh_TW, alias is registered:
'zh_tw': 'zh_TW.big5',
But I don't think adding `lzh_tw` to alias is good idea.
There are no "one right alias table". In case of zh_tw, you may
want zh_TW.UTF-8 rather than zh_TW.bit5, don't you?
So I think supporting locale name without encoding is right way.
Maybe, we should return None for encoding in such situation.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32781>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com