windows - Codepage 850 works, 65001 fails! There is NO response to "call foo.cmd". internal commands work fine -


The question basically explains the problem.

I am using Windows XP Pro Service Pack 3
ComSpec = C: \ wINDOWS \ system32 \ cmd.exe
I started the console via Start ... Run- Dialog ... cmd.exe

This is the "view" of my console:
order, then output (and my // comments)

  C: \ & Gt; Chcp 850 Active Code Page: 850 // output is expected C: \ & gt; Echo @ CCP ^ & amp; REM 850 & gt; Test 850.cmd // no output; As estimated) C: \ & gt; Type test850.cmd @chcp & amp; REm 850 // output is expected C: \ & gt; Call test850.cmd Active code page: 850 // output is expected  

The above work is fine (as expected). Things are happy in Windows-Land, but when I codepage 65001

  C: \> Chcp 65001 Active code page: 65001 // output is expected C: \ & gt; Echo @ CCP ^ & amp; REM 65001 & gt; Test65001.cmd // no output; As estimated C: \ & gt; Type test65001.cmd @chcp & amp; REEM 65001 / output is expected C: \ & gt; Call test65001.cmd // no output, no error, nothing, NADA ... except for frustration ...  

What's happening (not happening) here ?

Interesting, it's not really going at all. If you do the following:

  pax> Echo Echo or & gt; Xx.cmd pax & gt; Chcp 850 px & gt; Xx yy pax & gt; Chcp 65001 pax & gt; XX Packs & gt; _  

You get nothing this is not just losing the output, it is not running at all (as if starting . first echo is entered by entering the line). In Code 850, Explorer runs, code for page 65001 is not.

There is some discussion on this issue. You can run your script like this:

  chcp 65001 & amp; Amp; Xx.cmd & amp; Amp; Chcp 850  

So there seems to be a problem starting the command files, but when you enter the code, the code is page 65001!

Net is suggesting that PowerShell can be a good option, which provides old support in cmd.exe . This is a decision that you have to evaluate for yourself, but to make many tools to work in the same organization, I have to do the same thing, I suspect Microsoft tries to make any progress behind the PowerShell , Not the old command shell. Their resources are large but not unlimited.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -