/ Published in: Diff
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
diff -ur ./Python-2.5.1.orig/Lib/locale.py ./Python-2.5.1/Lib/locale.py --- ./Python-2.5.1.orig/Lib/locale.py 2006-05-18 11:06:40.000000000 +0900 +++ ./Python-2.5.1/Lib/locale.py 2007-09-09 12:50:14.000000000 +0900 @@ -485,7 +485,7 @@ """ _setlocale(category, _build_localename(getdefaultlocale())) -if sys.platform in ('win32', 'darwin', 'mac'): +if sys.platform in ('win32', 'mac'): # On Win32, this will return the ANSI code page # On the Mac, it should return the system encoding; # it might return "ascii" instead diff -ur ./Python-2.5.1.orig/Modules/_localemodule.c ./Python-2.5.1/Modules/_localemodule.c --- ./Python-2.5.1.orig/Modules/_localemodule.c 2007-04-03 13:39:34.000000000 +0900 +++ ./Python-2.5.1/Modules/_localemodule.c 2007-09-09 12:50:14.000000000 +0900 @@ -32,7 +32,7 @@ #include <wchar.h> #endif -#if defined(__APPLE__) +#if 0 #include <CoreFoundation/CoreFoundation.h> #endif @@ -410,7 +410,7 @@ } #endif -#if defined(__APPLE__) +#if 0 /* ** Find out what the current script is. ** Donated by Fredrik Lundh. @@ -683,7 +683,7 @@ METH_VARARGS, strcoll__doc__}, {"strxfrm", (PyCFunction) PyLocale_strxfrm, METH_VARARGS, strxfrm__doc__}, -#if defined(MS_WINDOWS) || defined(__APPLE__) +#if defined(MS_WINDOWS) || 0 {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, METH_NOARGS}, #endif #ifdef HAVE_LANGINFO_H
URL: http://weblog.metareal.org/2007/09/09/fixup-python-locale-problems-by-apple-darwin-patch/