Ambiguous locale.strxfrm

T

Tuomas Vesterinen

This was fixed once in Python 2.5, but in Python 3.0 the bug celebrates
its comeback. The tail of the strxfrm result is ambiguous.

Python 3.0.1 (r301:69556, Apr 14 2009, 14:30:31)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2
Type "help", "copyright", "credits" or "license" for more information..... print(locale.strxfrm('maupassant guy')==key1)
....
False
True
False
False
False
False
False
False
False
False

Tuomas Vesterinen
 
G

Gabriel Genellina

En Fri, 22 May 2009 06:32:40 -0300, Tuomas Vesterinen
This was fixed once in Python 2.5, but in Python 3.0 the bug celebrates
its comeback. The tail of the strxfrm result is ambiguous.

Python 3.0.1 (r301:69556, Apr 14 2009, 14:30:31)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2
Type "help", "copyright", "credits" or "license" for more information.... print(locale.strxfrm('maupassant guy')==key1)
...
False
True
False
False
False
False
False
False
False
False

I could not reproduce the issue on Windows (I don't have any locale using
utf8) but you should file a bug report at http://bugs.python.org/
 
T

Tuomas Vesterinen

Thanks. Bug report done, issue 6093.

Tuomas Vesterinen

Gabriel said:
En Fri, 22 May 2009 06:32:40 -0300, Tuomas Vesterinen
This was fixed once in Python 2.5, but in Python 3.0 the bug
celebrates its comeback. The tail of the strxfrm result is ambiguous.

Python 3.0.1 (r301:69556, Apr 14 2009, 14:30:31)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import locale
locale.setlocale(locale.LC_COLLATE, 'en_US.utf8') 'en_US.utf8'
key1=locale.strxfrm('maupassant guy')
for i in range(10):
... print(locale.strxfrm('maupassant guy')==key1)
...
False
True
False
False
False
False
False
False
False
False

I could not reproduce the issue on Windows (I don't have any locale
using utf8) but you should file a bug report at http://bugs.python.org/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top