Bug in our ru_RU.KOI8-R locale (with patch)?

From: Alexander Leidinger <Alexander_at_Leidinger.net>
Date: Wed, 1 Dec 2004 14:40:14 +0100
Hi,

I got a report that our ru_RU.KOI8-R locale seems to be broken. Attached
is a test program (test.pl, tested with perl 5.8.2) and some test input
(test.txt) which is supposed to show the problem. I can't read any
kyrillic language, so I can't really confirm if the attached patch is the
right fix.

If you run the test program you should see something like this (strange
looking text maybe because of the webmailer I use):
---snip---
Match small (RegEx with i flag): 0
Match small (RegEx without i flag): 8
Match for normal (RegEx with i flag): 17
Match for normal (RegEx without i flag): 9

Case - Check for '&#1103;&#1107;&#1112;&#1098;&#1096;&#1101;'
lc() => &#1103;&#1107;&#1112;&#1098;&#1096;&#1101;
uc() => &#1071;&#1075;&#1080;&#1066;&#1064;&#1069;
lcfirst() => &#1103;&#1107;&#1112;&#1098;&#1096;&#1101;
ucfirst() => &#1071;&#1107;&#1112;&#1098;&#1096;&#1101;

Case - Check for '&#1071;&#1107;&#1112;&#1098;&#1096;&#1101;'
lc() => &#1103;&#1107;&#1112;&#1098;&#1096;&#1101;
uc() => &#1071;&#1075;&#1080;&#1066;&#1064;&#1069;
lcfirst() => &#1103;&#1107;&#1112;&#1098;&#1096;&#1101;
ucfirst() => &#1071;&#1107;&#1112;&#1098;&#1096;&#1101;
---snip---

I'm told the "Case - Check" parts are correct with the patch, but not
without it (lc() -> lower case the entire string; uc() -> upper case the
entire string; lcfirst() -> lower case the first character; ...). Can
someone please confirm this?

If this is correct we've solved only a part of the problem. The other
part seems to be related to LC_COLLATE. "Match small" with the i flag
(case insensitive matching) shouldn't print 0 when "Match normal" with
the i flag doesn't print 0. Any ideas how to solve this?

If the patch isn't correct we still have a bug somwhere (please CC
perl_at_freebsd.org then). Why isn't perl able to do a case insensitive
match in the ru_RU.KOI8-R locale?

BTW.: this affects 4.x (problem noticed here), 5.x and -current (I've
tested the patch here).

Bye,
Alexander.

-- 
http://www.Leidinger.net/     Alexander _at_ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org/        netchild _at_ FreeBSD.org  : PGP ID = 72077137

Received on Wed Dec 01 2004 - 12:40:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:23 UTC