I have a perl script that prints some information for the console in Russian. The script will run on several operating systems, so the console encoding can be cp866, koi8-r, utf-8 or some other. Is there a portable way to detect console encoding, so I can configure STDOUT accordingly so that the text prints correctly?
source
share