China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-16 16:57
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to verify whether an input string contains double-byte characters View 2,980 Replies 15
Floor 16 Posted 2008-01-05 21:40 ·  中国 山西 运城 联通
银牌会员
★★★
天的白色影子
Credits 2,343
Posts 636
Joined 2004-03-06 00:00
22-year member
UID 19350
Gender Male
Status Offline

:: isDBCS.cmd - check whether the parameters contain multibyte characters
:: qzwqzw@www.cn-dos.net - 2008-01-05 21:18

@echo off & setlocal EnableDelayedExpansion
set strInput=%*------------------------------
set strInput=%strInput:~0,30%
echo %strInput%> "%temp%\_isDBCS.tmp"
for %%f in ("%temp%\_isDBCS.tmp?") do (
if "%%~zf"=="32" (echo parameter %* does not contain multibyte characters
) else ( echo parameter %* contains multibyte characters )
del "%%~f"
)
pause
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
everest79 +15 2008-01-05 21:44
Forum Jump: