FS#46255 - [python] function locale.strcoll doesn't work with the Croatian locale

Attached to Project: Arch Linux
Opened by Ivan (kivan) - Friday, 11 September 2015, 09:36 GMT
Last edited by Jelle van der Waa (jelly) - Saturday, 08 April 2017, 14:22 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Angel Velasquez (angvp)
Felix Yan (felixonmars)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Python function locale.strcoll doesn't work with the Croatian locale.
Please see the example below.
In Croatian language, lj is a letter and it comes after l in alphabet (http://mylanguages.org/croatian_alphabet.php).

Steps to reproduce:

On Archlinux:
Python 3.4.3 (default, Mar 25 2015, 17:13:50)
[GCC 4.9.2 20150304 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'hr_HR.UTF-8')
'hr_HR.UTF-8'
>>> locale.strcoll("lukav", "ljubav")<0
False
>>> locale.strxfrm("lukav")<locale.strxfrm("ljubav")
True

On CentOS and Ubuntu it works:
Python 3.4.3 (default, Jun 19 2015, 05:46:30)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'hr_HR.UTF-8') # Linux (POSIX)
'hr_HR.UTF-8'
>>> locale.strcoll("lukav", "ljubav")<0
True
>>> locale.strxfrm("lukav")<locale.strxfrm("ljubav")
True
This task depends upon

Closed by  Jelle van der Waa (jelly)
Saturday, 08 April 2017, 14:22 GMT
Reason for closing:  Works for me
Additional comments about closing:  Works for me

Loading...