[adding gnulib] On 06/01/2010 10:51 PM, River Tarnell wrote: > I'm using coreutils 8.5 on Solaris 10. > > GNU 'sort' fails to sort some input, while Solaris 'sort' handles it > correctly: > > willow% /opt/ts/gnu/bin/sort sort_test.txt > /opt/ts/gnu/bin/sort: string comparison failed: Illegal byte sequence > /opt/ts/gnu/bin/sort: Set LC_ALL='C' to work around the problem. > /opt/ts/gnu/bin/sort: The strings compared were > `\360\222\203\276\360\222\205\226' and > `\360\222\200\255\360\222\213\253\360\222\213\253\360\222\200\255'.
Thanks for the report. What locale are you using (that is, the entire output of 'locale')? I could not reproduce failure using: $ export LC_ALL; for f in $(locale -a); do LC_ALL=$f || continue; sort sort_test.txt >/dev/null || { echo $f; break; }; done on a GNU/Linux system with 732 installed locales. But it is highly likely that you could be in a non-UTF-8 locale, or that the Solaris multibyte functions are not as robust as glibc at detecting valid UTF-8 sequences. If it is indeed a bug in Solaris strcoll(), then gnulib can probably be taught to work around it. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature