Autodetect console output encoding in perl
Posted
by n0rd
on Stack Overflow
See other posts from Stack Overflow
or by n0rd
Published on 2010-06-06T10:30:34Z
Indexed on
2010/06/06
10:32 UTC
Read the original article
Hit count: 366
I have a perl script that prints some information to console in Russian. Script will be executed on several OSes, so console encoding can be cp866, koi8-r, utf-8, or some other. Is there a portable way to detect console encoding so I can setup STDOUT accordingly so the text is printed correctly?
© Stack Overflow or respective owner