[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[文本处理] BAT乱码问题

bat运行正常,但是放到BAT to exe,就不行了  乱码 求助下。chcp 65001   936都试了
BAT测试:
-----
Active code page: 65001

c:\ProgramData\gz>curl -X POST -H "Content-Type:test/json" -d "{\"SN\":\"T8400P2020350AB6\",\"
1>>1.TXT
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   317  100   249  100    68   5928   1619 --:--:-- --:--:-- --:--:--  7925

c:\ProgramData\gz>findstr /r PASS "1.txt"   1>NUL 2>NUL

c:\ProgramData\gz>IF ERRORLEVEL 1 goto 1

c:\ProgramData\gz>color 0c

c:\ProgramData\gz>echo FAIL
FAIL
msg":"流程错误1,当前站位STOCKIN","res
Press any key to continue . . .
BAT TO EXE----
Active code page: 65001

c:\ProgramData\gz>curl -X POST -H "Content-Type:test/json" -d "{\"SN\":\"T8
020350AB6\",\"action\":\"Save2NextStation\",\"Station\":\"TN\"}" "http://19
.1.234/api/mes.php"  1>>1.TXT
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Cur
                                 Dload  Upload   Total   Spent    Left  Spe
100   317  100   249  100    68   6384   1743 --:--:-- --:--:-- --:--:--  8

c:\ProgramData\gz>findstr /r PASS "1.txt"   1>NUL 2>NUL

c:\ProgramData\gz>IF ERRORLEVEL 1 goto 1

c:\ProgramData\gz>color 0c

c:\ProgramData\gz>echo FAIL
FAIL
The system cannot write to the specified device.
Press any key to continue . . .

BAT  测试是单独运行没问题     BAT TO EXE  就提示The system cannot write to the specified device.

TOP

BAT TO EXE   换chcp 936如下

活动代码页: 936
c:\ProgramData\gz>echo FAIL
FAIL
msg":"娴佺▼閿欒1锛屽綋鍓嶇珯浣峉TOCKIN","res
请按任意键继续. . .

TOP

返回列表