Good time of the day, people.
I'm localizing perl script (from english to russian) and have problems w/ encoding when script prints to terminal (encoding utf-8).
I made a module (encoding utf-8) where is my collection of variables, now i translate it. Then i transfer those variables to the script through qw().
Problem is that after direct printing to terminal those variables give me unreadable characters, like ив.
I have tried to put
use Encode; binmode STDOUT, ":encoding(UTF-8)";
but it did not help me.
So, i have to decode every variable before use unless i do want to see the garbage:
$out=decode( "UTF-8", $out);My questions are:
1. Is there an easier way to output variables w/o need of decoding every variable?
2. Why i having variables' contetnt written in utf8 and terminal in utf8 - can not simply print it so it might be readable in russian?
3. May you have other (simpler) suggestions regarding localization of scripts?
Thanks for any advance.
In reply to Problems w/ encoding in terminal by humble
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |