Message284620
| Author |
ncoghlan |
| Recipients |
Jan Niklas Hasse, abarry, akira, barry, deleted250130, ezio.melotti, lemburg, methane, ncoghlan, r.david.murray, vstinner, yan12125 |
| Date |
2017年01月04日.08:01:45 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1483516905.86.0.104790994099.issue28180@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
On Mac OS X, the XCode libc already ignores the locale settings and just uses UTF-8 as the default text encoding, so the hardcoding in CPython aligns with that behaviour.
That isn't the case on other *nix systems - there, we need CPython to be consistent with the configured C/C++ locale, *and* we need it to be using something other than ASCII as the default encoding.
Answer: coerce the default locale from C to C.UTF-8 (if available), or to en_US.UTF-8 (for older distros that don't provide C.UTF-8). (The latter aspect isn't in the PEP yet, it's an improvement that came up in the linux-sig discussions: https://github.com/python/peps/issues/171 ) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017年01月04日 08:01:46 | ncoghlan | set | recipients:
+ ncoghlan, lemburg, barry, vstinner, ezio.melotti, r.david.murray, methane, akira, deleted250130, yan12125, abarry, Jan Niklas Hasse |
| 2017年01月04日 08:01:45 | ncoghlan | set | messageid: <1483516905.86.0.104790994099.issue28180@psf.upfronthosting.co.za> |
| 2017年01月04日 08:01:45 | ncoghlan | link | issue28180 messages |
| 2017年01月04日 08:01:45 | ncoghlan | create |
|