in reply to dealing with cyrillic characters

1) use Path::Tiny; path($fname)->slurp_raw or slurp_utf8

1) perlunitut: Unicode in Perl yes even if you're dealing with cyrillic characters encoding/io is explained

1) http://blogs.perl.org/users/leon_timmermans/2015/08/fileslurp-is-broken-and-wrong.html

  • Comment on Re: dealing with cyrillic characters (perlunitut)

Replies are listed 'Best First'.
Re^2: dealing with cyrillic characters (perlunitut)
by Aldebaran (Curate) on Jun 22, 2018 at 22:34 UTC

    Thanks for taking this question farther. The list of non-fixes for File::Slurp made me willing to try Path::Tiny. Where it ended up is having the routines that get english and russian captions completely analogous to each other:

    I tried to combine these two into one function and call it slightly differently, but I didn't succeed on the first try. Sometimes I just have to go with what I've got and call the template good enough for now.