Re: sorting russian text
On: Thu, 19 Nov 1998 22:17:09 +0400 (AMT) Eugene Sevinian writes:
>
> Hi,
> As I am working now on a multilingual text proccesing system I tried
> to use 'sort' for this purpose. From "man bash" I have read that the
> LANG variabale is responsible for local language setting. Assuming
> ru_RU is appropriate variable I set LANG=ru_RU; export LANG, but :((
> nothing had changed at all. Should I do something else? Help me,
> please!
I have checked my sort command (version 1.22) for the value de_DE for
LANG and it didn't work either.
I checked the documentation for both sort and the fileutils and
couldn't find any mentioning of locale support. So it seems to me
that it is simply not supported.
I tried it with perl and the following little sorting program:
use locale;
my @ARRAY;
my $i;
while(<>) {
push @ARRAY, $_;
}
for $i (sort @ARRAY) {
print $i;
}
and it work perfectly (in my case treating ö like o). At least perl
is aware of locales.
Torsten
Reply to: