Created attachment 1080988 [details] Reproducer. Reproducer attached, strcoll() fails to compare "config" and "choose" in czech collation. Actual results: $ tar xf reproducer.tar.gz && cd reproducer $ make gcc main.c -o reproducer 8 7 Expected results: $ tar xf reproducer.tar.gz && cd reproducer $ make gcc main.c -o reproducer -7 7
Original bugreport: http://www.postgresql.org/message-id/CAFj8pRABKe6WOfvC=2bjv2vp=cBvyN5fbBj1t_JBNCAdTXjbNA@mail.gmail.com
“config“ comes before “choose” in the Czech alphabet because CH is a digraph that sorts between H and I. We cannot fix this without breaking the expected collation order for Czech.
Yes, but strcoll("config", "choose") returns positive number in cs_CZ, but should return negative. Or what am I missing here? Have you tried the reproducer, Florian?
I cannot reproduce this: $ cat main.c #include <stdio.h> #include <string.h> #include <locale.h> int main() { setlocale (LC_ALL, ""); printf("%d\n", strcoll("config", "choose")); return 0; } $ gcc -O2 -Wall main.c $ LC_ALL=cs_CZ ./a.out -7
Well, thats weird. I can do that on native 23 box and also in F23 mock on F23 box. While I'm not able to reproduce this in F22 box. My output looks like: sh-4.3# LC_ALL=cs_CZ ./a.out 8 sh-4.3# cat /etc/os-release | grep PRETTY PRETTY_NAME="Fedora 23 (Twenty Three)"
# from fedora 22 x86_64: mock -r fedora-23-x86_64 --copyin /tmp/reproducer.tar.gz / mock -r fedora-23-x86_64 --shell 'tar -xf reproducer.tar.gz && make -C reproducer' .... Start: shell make: Entering directory '/reproducer' 8 7 make: Leaving directory '/reproducer' Finish: shell .... Correctly working glibc prints: -7 7
Right, I used the wrong chroot, sorry.
I cam reproduce it in F23. This is upstream bug 18589, and reverting Leonhard's optimization fixes the sorting. I'll get this fixed ASAP.
Carlos, any progress on this?
(In reply to Pavel Raiskup from comment #9) > Carlos, any progress on this? I think this is being fixed via bug 1276711.
Truth, I'm not sure this is real duplicate but using updated glibc fixed this problem to me. *** This bug has been marked as a duplicate of bug 1276711 ***