中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-09 01:24
47,811 topics / 349,895 posts / today 0 new / 48,253 members
DOS批处理 & 脚本技术(批处理室) » How to make Simplified and Traditional systems share one batch file without garbled text
Printable Version  1,023 / 4
Floor1 wxs81514 Posted 2008-06-20 21:14
初级用户 Posts 52 Credits 118
Please give me some pointers:
I wrote a batch file in a Simplified Chinese system, but the Chinese parts can't be recognized in a Traditional Chinese system. This really troubles me, because some computers in our company use Traditional Chinese, some use Simplified Chinese, and some even have dual systems. Is there any way to make my batch file be recognized by both Simplified and Traditional Chinese systems?
I thought about making two versions of the batch file, one Simplified and one Traditional, and then letting the computer decide which one to run: if it's a Simplified Chinese system then execute the Simplified version, otherwise execute the Traditional version. But I don't know how to tell them apart.
Friends who know how, please give me a hand. Thanks in advance!
Floor2 fastslz Posted 2008-06-20 21:45
铂金会员 Posts 2,315 Credits 5,493 From 上海
Floor3 knoppix7 Posted 2008-06-21 12:38
银牌会员 Posts 634 Credits 1,287 From cmd.exe
chcp 936 >nul
GRAFTABL 950 >nul
This way, just 1 BAT is enough

But... it seems you need to have 2 code pages.
Floor4 quya Posted 2008-06-21 13:25
高级用户 Posts 172 Credits 558 From 江苏
Floor5 wxs81514 Posted 2008-06-25 20:04
初级用户 Posts 52 Credits 118
Many thanks to the brothers in the posts above, thanks!
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023