in reply to Unaccenting characters
I noticed several problems:
- Single quotes do not interpolate. Use $table{"$1"} or even no quotes at all: $table{$1}.
- Tell Perl what encoding your script uses. It should be UTF-8 and you should therefore use utf8;.
- If you are reading the data from a file, set the input encoding. You can use eitheropen my $IN, '<:utf8', $filename or die $!;
or
open my $IN, '<', $filename or die $!; binmode $IN, ':utf8';Set the output encoding to UTF-8, too, if you plan to output any accented characters.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Unaccenting characters
by mwhiting (Beadle) on Aug 29, 2013 at 16:41 UTC |
In Section
Seekers of Perl Wisdom