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

noreply@sourceforge.net noreply@sourceforge.net
Tue, 26 Nov 2002 01:06:00 -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: Closed
>Resolution: Accepted
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.

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

>Comment By: Martin v. L÷wis (loewis)
Date: 2002-11-26 10:06

Message:
Logged In: YES 
user_id=21627

Committed as

_localemodule.c 2.36
mactoolboxglue.c 1.14


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

Comment By: Martin v. L÷wis (loewis)
Date: 2002-11-22 10:24

Message:
Logged In: YES 
user_id=21627

Jack, do you have any comments on this? If not, I'll just
apply it.

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

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