I try to figure out how in Windows 10 with perl script to read an argument coded in cyrillic (cp437) and store it in text file encoded with utf8.
In the console chcp
command returns cp437 code page.
Search on StackOverflow returned several question of similar nature. I've attempted to utilize knowledge obtained from these posts but without success.
An examples demonstrating:
- how to read string (cyrillic) from console (cp437) and store it in a file (utf8)
- how to read file in utf8 format (cyrillic) and make content output to console (cp437)
- how to read string (cyrillic) from console (cp437) and output it to console in (cp1251)
would be greatly appreciated.
NOTE: console input (cp437) to output (cp1251) is purely for demonstration what it involves and how it is done properly.
UPDATE: cp437 does not include Cyrillic symbols, Perl uses ANSI system calls [CreateFileA] and can not pass Cyrillic characters into Perl without additional workaround. Default codepage for my system is cp1252 which does not cover Cyrillic symbols.