Ismail Donmez added the comment:
So in conclusion,
- Enabling wctypes makes Turkish support work with \u syntax, breaks
unicode()
- Disabling wctypes breaks Turkish support with \u and/or unicode()
Attached test.py tests Turkish corner cases of lower()/upper() . Correct
output is which python 2.4 gives :
Following should print I
I
Following should print i
i
Following should print İ
İ
Following should print ı
ı
Added file: http://bugs.python.org/file9006/test.py
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1609>
__________________________________
#!/usr/bin/python
# -*- coding: utf-8 -*-
import locale
locale.setlocale(locale.LC_ALL,"tr_TR.UTF-8")
print "Following should print I"
try:
print u"\u0131".upper()
except UnicodeDecodeError:
print "Got a unicode decode error"
print "Following should print i"
try:
print u"\u0130".lower()
except UnicodeDecodeError:
print "Got a unicode decode error"
print u"Following should print İ"
try:
print u"i".upper()
except UnicodeDecodeError:
print "Got a unicode decode error"
print u"Following should print ı"
try:
print u"I".lower()
except UnicodeDecodeError:
print "Got a unicode decode error"
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com