$CONSOLE->InputCP(1252);
[system("chcp 1252");] seems to spawn a shell, change the code page there
While that's true, it doesn't matter. The OEM code page is a console setting, not a per-process setting.
>perl -MData::Dumper -e"$Data::Dumper::Useqq=1; system('chcp 1252'); print(Dumper(`dir /b *.txt`)); system('chcp 437'); print(Dumper(`dir /b *.txt`));" Active code page: 1252 $VAR1 = "\355.txt\n"; Active code page: 437 $VAR1 = "\241.txt\n";
In reply to Re: Changing code page from perl
by ikegami
in thread Changing code page from perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |