I've gotten the following to work (after doing a Linux localedef command for
fi_FI - finnish) and am now trying to achieve some knowledge of how to do
manipulations/matchings using the utf8 pragma.

The locale test reads:

#!/usr/bin/perl -w

use POSIX;
use locale;

$loc = POSIX::setlocale( &POSIX::LC_ALL, "fi_FI" );

$foo = "Söderkulla";

print "locale $loc, foo $foo, FOO ".uc($foo)."\n";


with its output being:

locale fi_FI, foo Söderkulla, FOO SÖDERKULLA



and the utf8 test reads:

#!/usr/bin/perl

use utf8;

$foo = "Söderkulla";
print "foo $foo; FOO ".uc($foo)."\n";

but I get the error messages:

Malformed UTF-8 character (unexpected non-continuation byte 0x64 after start byte 
0xf6) at ./x.x line 5.
Malformed UTF-8 character (unexpected non-continuation byte 0x64 after start byte 
0xf6) in uc at ./x.x line 6.
Malformed UTF-8 character (unexpected non-continuation byte 0x64 after start byte 
0xf6) in uc at ./x.x line 6.
foo Söderkulla; FOO SKULLA

I would imagine it has something to do with the assignment to $foo being made
in a byte orientation and that I need to do some encoding to utf8 on the
string before assignment.  Any pointers?

Thanks,

Dave

Reply via email to