Message342010
> I dislike lying in the locale module. This change is basically useless
> with my PR 13230.
Yes, functionally it's no different than using 'cp65001' as an alias. That said, the CRT special cases 65001 as "utf8":
>>> locale.setlocale(locale.LC_CTYPE, '')
'English_United Kingdom.utf8'
>>> crt_locale = ctypes.CDLL('api-ms-win-crt-locale-l1-1-0', use_errno=True)
>>> crt_locale.___lc_codepage_func()
65001
So the suggested change makes the locale module internally consistent on Windows and more transparent for anyone who doesn't know off the top of their head that "cp65001" is just UTF-8. |
|
Date |
User |
Action |
Args |
2019-05-09 23:34:07 | eryksun | set | recipients:
+ eryksun, paul.moore, vstinner, tim.golden, methane, zach.ware, serhiy.storchaka, steve.dower, Paul Monson |
2019-05-09 23:34:07 | eryksun | set | messageid: <1557444847.17.0.809507258781.issue36778@roundup.psfhosted.org> |
2019-05-09 23:34:07 | eryksun | link | issue36778 messages |
2019-05-09 23:34:06 | eryksun | create | |
|