Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Nov 2004 17:42:07 +0100
From:      "Alexander@Leidinger.net" <netchild@FreeBSD.org>
To:        ache@freebsd.org, perl@freebsd.org
Cc:        tode@bpanet.de
Subject:   Strange behavior of LANG=ru_RU.KOI8-R on 4.x
Message-ID:  <1101228127.41a3685fa3921@netchild.homeip.net>

next in thread | raw e-mail | index | archive | help
This message is in MIME format.

---MOQ1101228122ac763be464bbea5653b504b067dca2f2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

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

---MOQ1101228122ac763be464bbea5653b504b067dca2f2
Content-Type: application/octet-stream; name="test.pl"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.pl"

IyEvdXNyL2Jpbi9lbnYgcGVybAoKdXNlIGxvY2FsZTsKCm15ICRmaWxlCQk9ICd0ZXN0LnR4dCc7
Cm15ICR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ByaW50ICJDYXNlIC0gQ2hlY2sgZm9yIFwnJHN0cmluZ1wnXG4iOwoJcHJpbnQg
ImxjKCkgPT4gIi5sYygkc3RyaW5nKS4iXG4iOwoJcHJpbnQgInVjKCkgPT4gIi51Yygkc3RyaW5n
KS4iXG4iOwoJcHJpbnQgImxjZmlyc3QoKSA9PiAiLmxjZmlyc3QoJHN0cmluZykuIlxuIjsKCXBy
aW50ICJ1Y2ZpcnN0KCkgPT4gIi51Y2ZpcnN0KCRzdHJpbmcpLiJcbiI7CgkKCXByaW50ICJcbiI7
CgoJcmV0dXJuIDE7Cn0KCgpzdWIgTG9hZEZpbGUgewoJbXkgJGZpbGUJPSBzaGlmdChAXyk7Cglt
eSBAdmFsdWUJPSAoKTsKCW9wZW4oRklMRSwgIjwkZmlsZSIpOwoJQHZhbHVlCQk9IDxGSUxFPjsK
CWNsb3NlKEZJTEUpOwoJY2hvbXAoQHZhbHVlKTsKCXJldHVybiBcQHZhbHVlOwp9Cgo=

---MOQ1101228122ac763be464bbea5653b504b067dca2f2
Content-Type: text/plain; name="test.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.txt"

7/P46ujtDQrP8/jq6O0NClRlc3QNClRlc3QNClRFU1QNCnRFU1QNCu/z+Oro7Q0Kz/P46ujtDQpU
ZXN0DQpUZXN0DQpURVNUDQp0RVNUDQrv8/jq6O0NCu/z+Oro7Q0K7/P46ujtDQrv8/jq6O0NCs/z
+Oro7Q0Kz/P46ujtDQrP8/jq6O0NCs/z+Oro7Q0Kz/P46ujtDQrv8/jq6O0NCs/z+Oro7Q0Kz/P4
6ujtDQrv8/jq6O0NCg0KQ09VTlQgbG93ZXIgOCB1cHBlciA5DQoNCg==

---MOQ1101228122ac763be464bbea5653b504b067dca2f2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1101228127.41a3685fa3921>