Interestingly, this does not work at all. If you do the following:
pax> echo echo yy >xx.cmd pax> chcp 850 pax> xx yy pax> chcp 65001 pax> xx pax> _
nothing happens. This is not just the lack of output, it does not work at all (as evidenced by the placement of start . To the echo line). On the code page 850 Explorer works, not for code page 65001.
The question is discussed here . You can run the script with:
chcp 65001 && xx.cmd && chcp 850
so this seems to be some kind of problem when running batch files, but only when the code page is 65001 before entering the command!
Others on the net seem to suggest that PowerShell might be a good choice, given the lackluster support in cmd.exe . This is a solution that you will need to evaluate on your own, but, working in a large organization with many tools to do the same job, I suspect that Microsoft will pay more attention to PowerShell over the older command shell. Their resources are large, but not unlimited.
source share