Eryk Sun <eryk...@gmail.com> added the comment:

Terry, the test_winconsoleio problem is issue 38325. Test cases with surrogate 
pairs that are known to fail in recent builds of Windows 10 have to be split 
out.

For the "ps_AF" locale failure that you noted, in my case with Windows 10 
18362, I have to first modify the tests in Lib/test/test__locale.py to set 
LC_CTYPE before setting LC_NUMERIC. Otherwise the lconv result in C has the 
wrong encoding, and PyUnicode_DecodeLocale fails. 

After making this change, I can reproduce the noted failure. The "ps_AF" 
(Pashto, Afghanistan) case will have to be skipped in Windows because the 
system NLS data does not agree with the assumed Arabic decimal and thousands 
separator, U+066B and U+066C, but instead uses "," and ".". This can be 
verified directly via WINAPI GetLocaleInfoEx:

    >>> n = kernel32.GetLocaleInfoEx('ps-AF', LOCALE_SSCRIPTS, buf, len(buf))
    >>> buf.value
    'Arab;'
    >>> n = kernel32.GetLocaleInfoEx('ps-AF', LOCALE_SDECIMAL, buf, len(buf))
    >>> buf.value
    ','
    >>> n = kernel32.GetLocaleInfoEx('ps-AF', LOCALE_STHOUSAND, buf, len(buf))
    >>> buf.value
    '.'

In case this was a quirk in the NLS data for languages that use a Perso-Arabic 
script, such as Pashto, I also checked Saudi Arabia ("ar-SA"), which uses a 
standard Arabic script, but the result was the same.

----------
nosy: +eryksun

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

Reply via email to