[issue2481] locale.strxfrm does not work with Unicode strings

2020-05-31 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2481] locale.strxfrm does not work with Unicode strings

2012-01-01 Thread Jay Freeman (saurik)

Jay Freeman (saurik) sau...@saurik.com added the comment:

Given that Python 3.x is still not ready for general use (and when this is 
discussed people make it quite clear that this is to be expected, and that a 
many year timeline was originally proposed for the Python 3.0 transition), it 
seems like this bug fix should have been backported to 2.x at some point in the 
last four years it has been open. :(

--
nosy: +saurik

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2481
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2481] locale.strxfrm does not work with Unicode strings

2012-01-01 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

saurik: can you propose a patch?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2481
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2481] locale.strxfrm does not work with Unicode strings

2012-01-01 Thread Jay Freeman (saurik)

Jay Freeman (saurik) sau...@saurik.com added the comment:

I have attached a tested patch against Python-2.7.2.tgz (as I do not know how 
to use hg currently). It should be noted that I also am not 100% certain how 
the Python build environment works, but the way I added the wcsxfrm test was to 
add it to configure.in, then run autoheader and autoconf.

It also should be noted that the original code called strxfrm and did not check 
for an error result: neither does my new code (which is mostly based on 
formulaic modifications of the existing code in addition to educated guesses 
with regards to coding and formatting standards: feel free to change, 
obviously).

Finally, I noticed while working on this that --enable-unicode=no does not work 
(there is a check that enforces that it must be either ucs2 or ucs4): seems 
like an easy fix. That said, I ran into numerous other issues trying to make a 
non-Unicode build, and in the end gave up. My code looks like it should work, 
however, were someone to figure out how to build a non-Unicode Python 2.7.

--
keywords: +patch
Added file: http://bugs.python.org/file24125/wcsxfrm.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2481
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2481] locale.strxfrm does not work with Unicode strings

2010-08-21 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
versions: +Python 2.7 -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2481
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2481] locale.strxfrm does not work with Unicode strings

2008-03-25 Thread Christoph Zwerschke

New submission from Christoph Zwerschke [EMAIL PROTECTED]:

While locale.strcoll seems to work with Unicode strings, locale.strxfrm
gives a UnicodeError. Example:

###

try:
locale.setlocale(locale.LC_ALL, 'de')
except locale.Error: # Windoof
locale.setlocale(locale.LC_ALL, 'german')

s = ['Ägypten', 'Zypern']

print sorted(s, cmp=locale.strcoll) # works
print sorted(s, key=locale.strxfrm) # works

s = [u'Ägypten', u'Zypern']

print sorted(s, cmp=locale.strcoll) # works
print sorted(s, key=locale.strxfrm) # UnicodeError

###

Therefore, it is not possible to sort lists of Unicode strings
effectively. If possible, this should be fixed. If not possible, this
problem should at least be mentioned in the documentation. Currently,
the docs do not indicate that strcoll and strxfrm behave differently
concerning Unicode.

--
components: Unicode
messages: 64484
nosy: cito
severity: normal
status: open
title: locale.strxfrm does not work with Unicode strings
type: behavior
versions: Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2481
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2481] locale.strxfrm does not work with Unicode strings

2008-03-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


--
assignee:  - loewis
nosy: +loewis

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2481
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2481] locale.strxfrm does not work with Unicode strings

2008-03-25 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

FWIW, this is fixed in Python 3.0.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2481
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2481] locale.strxfrm does not work with Unicode strings

2008-03-25 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

Sure, although it probably shouldn't be backported to 2.5.

--
versions: +Python 2.6 -Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2481
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com