Ismail Donmez added the comment:
Test works fine when using the \u syntax. You have to use the unicode()
with Turkish characters to get the error. See attached test2.py
With python 2.4 :
[~]> python test2.py
Following should print I
I
Following should print i
i
With python 2.5 SVN :
[~/python-2.5]> ./python ~/test2.py
Following should print I
Got a unicode decode error
Following should print i
Got a unicode decode error
Added file: http://bugs.python.org/file9005/test2.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 unicode("ı").upper()
except UnicodeDecodeError:
print "Got a unicode decode error"
print "Following should print i"
try:
print unicode("İ").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