3
# DP: Fix issues with turkish locale.
6
if [ $# -eq 3 -a "$2" = '-d' ]; then
9
elif [ $# -ne 1 ]; then
10
echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
15
patch $pdir -f --no-backup-if-mismatch -p0 < $0
18
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
21
echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
26
--- Lib/decimal.py 2008-01-08 23:42:03.000000000 +0200
27
+++ Lib/decimal.py 2008-01-15 05:21:33.000000000 +0200
29
ROUND_HALF_DOWN = 'ROUND_HALF_DOWN'
30
ROUND_05UP = 'ROUND_05UP'
35
+ trans_table = string.maketrans(string.ascii_lowercase, string.ascii_uppercase)
36
+ return s.translate(trans_table)
40
class DecimalException(ArithmeticError):
42
if name.startswith('_round_')]
43
for name in rounding_functions:
44
# name is like _round_half_even, goes to the global ROUND_HALF_EVEN value.
45
- globalname = name[1:].upper()
46
+ globalname = ascii_upper(name[1:])
47
val = globals()[globalname]
48
Decimal._pick_rounding_function[val] = name
50
--- Python/codecs.c 2006-06-23 17:16:18.000000000 -0400
51
+++ Python/codecs.c 2007-10-30 12:51:10.000000000 -0400
52
@@ -45,6 +45,11 @@ int PyCodec_Register(PyObject *search_fu
56
+/* isupper() forced into the ASCII Locale */
57
+#define ascii_isupper(x) (((x) >= 0x41) && ((x) <= 0x5A))
58
+/* tolower() forced into the ASCII Locale */
59
+#define ascii_tolower(x) (ascii_isupper(x) ? ((x) + 0x20) : (x))
61
/* Convert a string to a normalized Python string: all characters are
62
converted to lower case, spaces are replaced with underscores. */
64
@@ -70,7 +75,7 @@ PyObject *normalizestring(const char *st
68
- ch = tolower(Py_CHARMASK(ch));
69
+ ch = ascii_tolower(Py_CHARMASK(ch));
73
--- Lib/email/__init__.py 2008-07-02 18:58:15.000000000 +0300
74
+++ Lib/email/__init__.py 2008-07-02 18:59:28.000000000 +0300
80
+lower_map = string.maketrans(string.ascii_uppercase, string.ascii_lowercase)
82
for _name in _LOWERNAMES:
83
- importer = LazyImporter(_name.lower())
84
+ importer = LazyImporter(_name.translate(lower_map))
85
sys.modules['email.' + _name] = importer
86
setattr(sys.modules['email'], _name, importer)
90
for _name in _MIMENAMES:
91
- importer = LazyImporter('mime.' + _name.lower())
92
+ importer = LazyImporter('mime.' + _name.translate(lower_map))
93
sys.modules['email.MIME' + _name] = importer
94
setattr(sys.modules['email'], 'MIME' + _name, importer)
95
setattr(sys.modules['email.mime'], _name, importer)