[issue6525] Problem with string.lowercase in Windows XP

2009-07-23 Thread Peter Landgren
Peter Landgren added the comment: Obviously, 2.5 and 2.6 decode the "string.lowercase" when print is used and 2.6 seems to be the correct. Yes. I get exactly the same result in both Python 2.5.2 (r252:60911, Jan 8 2009, 12:17:37) and Python 2.6.2 (r262:71600, Jul 23 2009, 09:01:02) showing

[issue6525] Problem with string.lowercase in Windows XP

2009-07-22 Thread Ezio Melotti
Ezio Melotti added the comment: I did some test as well and here is what I got: Python2.4 WinXP: >>> import locale >>> import string >>> locale.setlocale(locale.LC_ALL, '') 'Italian_Italy.1252' >>> string.lowercase 'abcdefghijklmnopqrstuvwxyz\x83\x9a\x9c\x9e\xaa\xb5\xba\xdf\xe0\xe1\xe2\xe3\xe4\x

[issue6525] Problem with string.lowercase in Windows XP

2009-07-22 Thread Peter Landgren
Peter Landgren added the comment: OK, Agreed for 2.6. But for 2.5 many of the characters returned by string.lowercase: âܣ׬Á║▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷°¨·¹³²■ are not lowercase letters at all, but that is history now, as 2.5 is history. We solved it by using ascii_lowercase. Thanks, Peter Landg

[issue6525] Problem with string.lowercase in Windows XP

2009-07-22 Thread Georg Brandl
Georg Brandl added the comment: This behavior is not a bug - when setting the locale, string.lowercase and friends are augmented by whatever the locale considers uppercase and lowercase letters, as byte strings. This will lead to decoding errors when these strings are combined with Unicode stri

[issue6525] Problem with string.lowercase in Windows XP

2009-07-20 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue6525] Problem with string.lowercase in Windows XP

2009-07-20 Thread Peter Landgren
Peter Landgren added the comment: Just some more test. I compared the result of string.letters, string.uppercase and string.lowercase in 2.5 and 2.6: Python25: Letters= ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzâèîÄܣ׃¬Á║└┴┬├─┼ãà ╚╔╩╦╠═╬¤ðÐÊËÈıÍÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷°¨·¹³²■ 

[issue6525] Problem with string.lowercase in Windows XP

2009-07-20 Thread R. David Murray
R. David Murray added the comment: Hmm. I thought I remembered looking at this before. See (closed) issue 1633600. It looks like the linux issue is fixed in 2.7, but I'm not sure when or how, nor can I reproduce my test or yours at the moment since I seem to have a configuration problem on my

[issue6525] Problem with string.lowercase in Windows XP

2009-07-20 Thread Peter Landgren
Peter Landgren added the comment: OK about 2.5 Downloaded and installed Python 2.6.2 on my Win XP box and get the same error as with Python 2.5.1. Ok about Python 3, it will be nice when we have upgraded our application, Gramps, to this version and get rid of all kind of coding issues. ---

[issue6525] Problem with string.lowercase in Windows XP

2009-07-20 Thread R. David Murray
R. David Murray added the comment: That's still not a crash...a crash is when the python interpreter fails. 2.5 isn't getting bug fixes any more. Do you see the same problem in 2.6? In 3.x this is a non-issue, since 3.x uses unicode internally. -- nosy: +r.david.murray _

[issue6525] Problem with string.lowercase in Windows XP

2009-07-20 Thread Peter Landgren
Peter Landgren added the comment: True, but later in the application code like this a = u"qaz" + string.lowercase[26] causes a = u"qaz" + string.lowercase[26] UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 0: ordinal not in range(128) 0x83 corresponds to â. --

[issue6525] Problem with string.lowercase in Windows XP

2009-07-20 Thread Peter Landgren
Peter Landgren added the comment: Thru, but later in the application code like this a = u"qaz" + string.lowercase[26] causes a = u"qaz" + string.lowercase[26] UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 0: ordinal not in range(128) 0x83 corresponds to â. --

[issue6525] Problem with string.lowercase in Windows XP

2009-07-20 Thread R. David Murray
Changes by R. David Murray : -- priority: -> normal type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue6525] Problem with string.lowercase in Windows XP

2009-07-20 Thread Peter Landgren
New submission from Peter Landgren : string.lowercase is changed after locale.setlocale(locale.LC_ALL,'') in Windows XP but not in Linux. This little test script on Windows XP and Linux explains the problem: import locale import string print string.lowercase print locale.setlocale(locale.LC_ALL,