This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年10月22日 07:27 by dpm, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg200886 - (view) | Author: David Planella (dpm) | Date: 2013年10月22日 07:27 | |
It seems getdefaultlocale does not return the correct encoding when the locale is set to ca_ES@valencia: >>> import locale >>> locale.setlocale(locale.LC_ALL, "") 'LC_CTYPE=ca_ES.UTF-8@valencia;LC_NUMERIC=ca_ES.UTF-8;LC_TIME=ca_ES.UTF-8;LC_COLLATE=ca_ES.UTF-8@valencia;LC_MONETARY=ca_ES.UTF-8;LC_MESSAGES=ca_ES.UTF-8@valencia;LC_PAPER=ca_ES.UTF-8;LC_NAME=ca_ES.UTF-8;LC_ADDRESS=ca_ES.UTF-8;LC_TELEPHONE=ca_ES.UTF-8;LC_MEASUREMENT=ca_ES.UTF-8;LC_IDENTIFICATION=ca_ES.UTF-8' >>> locale.getdefaultlocale() ('ca_ES', 'utf_8_valencia') Instead of 'utf_8_valencia', here I'd expect 'UTF-8' to be returned. The returned locale is also wrong: it should be ca_ES@valencia. Looking quickly at the locale module's source code, it seems that the following item should be added to the locale_alias dict? 'ca_es.@valencia': 'ca_ES@valencia.UTF-8', |
|||
| msg200919 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2013年10月22日 11:40 | |
This is a duplicate of issue5815. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:52 | admin | set | github: 63540 |
| 2013年10月22日 11:40:53 | serhiy.storchaka | set | status: open -> closed superseder: locale.getdefaultlocale() missing corner case nosy: + serhiy.storchaka messages: + msg200919 resolution: duplicate stage: resolved |
| 2013年10月22日 07:27:59 | dpm | create | |