New submission from Serhiy Storchaka:

>>> import locale
>>> locale.setlocale(locale.LC_NUMERIC, 'uk_UA')
'uk_UA'
>>> locale.getlocale(locale.LC_NUMERIC)
('uk_UA', 'KOI8-U')
>>> locale.nl_langinfo(locale.THOUSEP)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'locale' codec can't decode byte 0x9a in position 0: 
Invalid or incomplete multibyte or wide character

Looks as locale.nl_langinfo() always uses the UTF-8 encoding (or may be 
locale.getpreferredencoding()).

----------
components: Library (Lib)
messages: 255979
nosy: lemburg, loewis, serhiy.storchaka
priority: normal
severity: normal
status: open
title: locale.nl_langinfo() can't decode value
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

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

Reply via email to