J
J
jslby2015-08-27 13:50:38
Perl
jslby, 2015-08-27 13:50:38

How to read a file line by line in Russian in perl?

I try to read the file line by line, everything works fine with English text, but when the file is in Russian... there is a problem.
Are there any features of iterating over the lines of a file in Russian?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
targumon, 2015-08-27
@jslby

Try adding:

# Под виндой
use locale;

# Под *nix
use POSIX qw( locale_h );
setlocale( LC_ALL, "ru_RU.UTF-8" );

S
Saboteur, 2015-08-27
@saboteur_kiev

perlgeek.de/en/article/encodings-and-unicode

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question