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.

classification
Title: _getdefaultlocale for OS X
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: jackjansen Nosy List: jackjansen, loewis
Priority: normal Keywords: patch

Created on 2002-11-03 19:59 by loewis, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
encodings.txt loewis, 2002-11-03 19:59
Messages (3)
msg41533 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-11-03 19:59
This patch implements getdefaultlocale using
CFStringGetSystemEncoding. It consists of three parts:

- check for __APPLE__, not macintosh, in
_localemodule.c, to support Darwin. I assume macintosh
is defined by the non-Darwin builds; Darwin currently
does not implement getdefaultlocale. I also assume that
__APPLE__ is defined on all Mac builds.

- return string literals for a few well-known encodings
(in particular the ones for which we have codecs).

- return the IANA charset name for all others. This
will usually be some X- string, since Apple hasn't
registered any of the charsets. If extension modules
support those encodings, they need to support those
names in the lookup functions as well. The names
returned by CFStringGetNameOfEncoding are useless as
they contain spaces, and other punctuation.
msg41534 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-11-22 09:24
Logged In: YES 
user_id=21627

Jack, do you have any comments on this? If not, I'll just
apply it.
msg41535 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-11-26 09:06
Logged In: YES 
user_id=21627

Committed as

_localemodule.c 2.36
mactoolboxglue.c 1.14
History
Date User Action Args
2022-04-10 16:05:48adminsetgithub: 37404
2002-11-03 19:59:52loewiscreate