| Summary: | collating in pl_PL locale is broken | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Rafal Rzepecki <divided.mind> |
| Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
| Status: | RESOLVED TEST-REQUEST | ||
| Severity: | normal | CC: | divided.mind |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | the script showing bad collating (iso-8859-2) | ||
|
Description
Rafal Rzepecki
2003-11-25 15:25:20 UTC
The collating order in pl_PL locale is somehow broken. As far as I know Polish
alphabet, the order should be
"aA??bBcC??dDeE??fFgGhHiIjJkKlL??mMnN??oOóÓpPqQrRsS??tTuUvVwWxXyYzZ????". And
it obviously isn't, as the following script shows.
Reproducible: Always
Steps to Reproduce:
Execute the following script:
--- CUT ---
#!/bin/bash
LC_ALL=pl_PL
echo "Locale set to ${LC_ALL}."
ENGLISH_ALPHABET="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
POLISH_ALPHABET="a?bc?de?fghijkl?mn?oópqrs?tuvwxyz??A?BC?DE?FGHIJKL?MN?OÓPQRS?TUVWXYZ??"
echo "Testing [a-z] with english alphabet. Should give \"Z\"."
echo ${ENGLISH_ALPHABET} | sed -e 's/[a-z]//g'
echo "Testing [A-Z] with english alphabet. Should give \"a\"."
echo ${ENGLISH_ALPHABET} | sed -e 's/[A-Z]//g'
echo "Testing [a-?] with english alphabet. Should give \"\"."
echo ${ENGLISH_ALPHABET} | sed -e 's/[a-?]//g'
echo "Testing [A-?] with english alphabet. Should give \"a\"."
echo ${ENGLISH_ALPHABET} | sed -e 's/[A-?]//g'
echo "Testing [a-z] with polish alphabet. Should give \"??Z??\"."
echo ${POLISH_ALPHABET} | sed -e 's/[a-z]//g'
echo "Testing [A-Z] with polish alphabet. Should give \"a????\"."
echo ${POLISH_ALPHABET} | sed -e 's/[A-Z]//g'
echo "Testing [a-?] with polish alphabet. Should give \"?\"."
echo ${POLISH_ALPHABET} | sed -e 's/[a-?]//g'
echo "Testing [A-?] with polish alphabet. Should give \"a\"."
echo ${POLISH_ALPHABET} | sed -e 's/[A-?]//g'
--- CUT ---
Actual Results:
$ ./testlocale_pl
Locale set to pl_PL.
Testing [a-z] with english alphabet. Should give "Z".
Z
Testing [A-Z] with english alphabet. Should give "a".
a
Testing [a-?] with english alphabet. Should give "".
Testing [A-?] with english alphabet. Should give "a".
a
Testing [a-z] with polish alphabet. Should give "??Z??".
??????????????Z??
Testing [A-Z] with polish alphabet. Should give "a????".
a????????????????
Testing [a-?] with polish alphabet. Should give "?".
????????????????
Testing [A-?] with polish alphabet. Should give "a".
a????????????????
Expected Results:
$ ./testlocale_pl
Locale set to pl_PL.
Testing [a-z] with english alphabet. Should give "Z".
Z
Testing [A-Z] with english alphabet. Should give "a".
a
Testing [a-?] with english alphabet. Should give "".
Testing [A-?] with english alphabet. Should give "a".
a
Testing [a-z] with polish alphabet. Should give "??Z??".
??Z??
Testing [A-Z] with polish alphabet. Should give "a????".
a????
Testing [a-?] with polish alphabet. Should give "?".
?
Testing [A-?] with polish alphabet. Should give "a".
a
$ qpkg -I -v glibc
sys-libs/glibc-2.3.2-r1 *
$ emerge info
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1,
2.4.20-gentoo-r5)
=================================================================
System uname: 2.4.20-gentoo-r5 i686 Celeron (Coppermine)
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -pipe -fomit-frame-pointer
-mmmx -msse -mfpmath=sse,387 -mno-sse2 -mno-3dnow -maccumulate-outgoing-args
-funsafe-math-optimizations -ffast-math"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/texmf/tex/generic/config
/usr/share/texmf/tex/platex/config /usr/X11R6/lib/X11/xkb
/usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -pipe
-fomit-frame-pointer -mmmx -msse -mfpmath=sse,387 -mno-sse2 -mno-3dnow
-maccumulate-outgoing-args -funsafe-math-optimizations -ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://gentoo.inode.at/
ftp://gentoo.inode.at/source/ http://ftp.easynet.nl/mirror/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.pl/gentoo-portage"
USE="x86 oss avi crypt cups encode foomaticdb gif jpeg libg++ mad mikmod mpeg
ncurses nls pdflib png quicktime spell truetype xml2 xv zlib directfb alsa
gdbm berkdb slang readline arts tetex aalib java ruby postgres X sdl gpm tcpd
pam libwww ssl perl python imlib oggvorbis qt kde opengl mozilla cdr scanner
acpi acpi4linux activefilter artswrappersuid dnd dvd gtk2 icc jikes joystick
lirc matroska mbox mmx offensive pda pic S3TC samba src sse stroke transcode
unicode usb videos -apm -gnome -svga -xmms -tcltk -esd -gtk -motif"
Created attachment 21293 [details]
the script showing bad collating (iso-8859-2)
It seems that bugzilla has eaten extended characters. The testscript is
attached.
Please try glibc-2.3.2-r9 if possible, thanks. Rafal, well? Still the same problem in 2.3.2-r9. I'll test glibc-2.3.3-beta soon. Stale bug. Reopen if this problem persists with current stable glibc (2.3.5-r2 at this time). |