I think you are right. The best way is to write in the help of the script that its STDOUT is encoded as UTF8.
I looked around how to do change the encoding of "cmd.exe".
I could do it temporarily as follows:
But the change of the new codepage 65001 is NOT stored permanently. If I open a new "cmd.exe" its codepage is 437 again.
A bit offtopic because this question is windows specific and not perl: Do you know how to change the codepage permanently to 65001 in Windows XP?
Would you recommend to write the following code at the beginning of the script:
`chcp 65001`;So I would assure that the encoding is UTF8. Of course I should find out the active codepage (e.g. 437) at the beginning of the script and then restore it at the end (perhaps in an END block). And I should also do it dependent on the OS. This for example would be a windows specific solution.
In reply to Re^2: Determine encoding of STDOUT
by Dirk80
in thread Determine encoding of STDOUT
by Dirk80
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |