[Patches] [ python-Patches-632973 ] _getdefaultlocale for OS X

noreply@sourceforge.net noreply@sourceforge.net
Sun, 03 Nov 2002 11:59:52 -0800


Patches item #632973, was opened at 2002-11-03 20:59
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=632973&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: Jack Jansen (jackjansen)
Summary: _getdefaultlocale for OS X

Initial Comment:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=632973&group_id=5470