Strange behavior of LANG=ru_RU.KOI8-R on 4.x

Alexander at Leidinger.net netchild at FreeBSD.org
Tue Nov 23 16:42:27 GMT 2004


Hi,

I got a report of strange behavior if someone uses ru_RU.KOI8-R with perl
5.8.5 on FreeBSD 4.7. I don't have acess to a 4.7 system, but I can
reproduce it on my -current system.

Safe the attachments into a directory and run (assuming 5.3 or -current)
 LANG=C perl test.pl
 LANG=ru_RU.KOI8-R perl testl.pl
 LANG=ru_RU.UTF-8 perl test.pl

I did this and I noticed that with LANG=C there's no change (e.g. first
letter is always like in the "Check" line, even if it should have
changed to lower or upper case). I expected this since the C locale
can't kow about russian letters. The number of matches is expected too.

With ru_RU.KOI8-R it looks like the meaning of lower and upper case is
reversed. If I use ru_RU.UTF-8, the output looks right, but the number
of matches still doesn't show a sane output (the number of case insensitive
matches for small and normal isn't the same).

Background: the search function of a large perl application (Interchange)
fails to do case insensitive searches in the above mentioned locale.

Any ideas what's happening here and how to fix it?

Bye,
Alexander.

-- 
http://www.Leidinger.net/     Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org/        netchild @ FreeBSD.org  : PGP ID = 72077137
Endless Loop: n., see Loop, Endless.
Loop, Endless: n., see Endless Loop.
		-- Random Shack Data Processing Dictionary
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pl
Type: application/octet-stream
Size: 1247 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-perl/attachments/20041123/c8889fde/test.obj
-------------- next part --------------
ïóøêèí
Ïóøêèí
Test
Test
TEST
tEST
ïóøêèí
Ïóøêèí
Test
Test
TEST
tEST
ïóøêèí
ïóøêèí
ïóøêèí
ïóøêèí
Ïóøêèí
Ïóøêèí
Ïóøêèí
Ïóøêèí
Ïóøêèí
ïóøêèí
Ïóøêèí
Ïóøêèí
ïóøêèí

COUNT lower 8 upper 9



More information about the freebsd-perl mailing list