in reply to dealing with cyrillic characters
Hi. Your text files are probably encoded in UTF-8. So you need to tell this to Perl, and in particular to File::Slurp. You can do this simply replacing your line
my $string = read_file($file); with my $string= read_file( $file, binmode => ':utf8' );This requires your file to be in UTF-8. You should be able to change the "utf8" with the encoding of your text. You can check this using simply a Text Editor like Notepad++
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: dealing with cyrillic characters
by Aldebaran (Curate) on Jun 22, 2018 at 17:43 UTC | |
by haukex (Archbishop) on Jun 23, 2018 at 08:50 UTC |