"Octavian Rasnita" schreef:
> I have also seen that length($string) returns the number of bytes of
> $string, and not the number of chars (if the string contains UTF-8
> chars).
This tells me that you are taking input from an octet buffer that comes
from outside.
my $octets = <>;
my $string;
eval {
$string = Encode::decode("utf8", $octets, Encode::FB_CROAK);
1;
} or {
# malformed input
}
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/