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-06-29 15:35
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » How to calculate and type the internal code of Chinese characters under pure DOS to enter the Chinese folder View 2,309 Replies 16
Original Poster Posted 2005-11-15 14:39 ·  中国 广东 肇庆 端州区 电信
初级用户
Credits 22
Posts 10
Joined 2005-11-15 13:56
20-year member
UID 45294
Gender Male
Status Offline
May I ask, in a pure DOS environment, how to open a folder with a Chinese file name? (Preferably without relying on software or creating batch files)

In pure DOS, Chinese characters cannot be displayed (they appear as garbled code). I once asked my teacher how to enter the "D:\Operating System" directory in pure DOS, and he actually calculated the four characters "Operating System" with a pen! The result was eight groups of three-digit numbers (178, 217, 215, 247, 207, 181, 205, 179). Each two groups of numbers were one character. In pure DOS, the garbled form of the four characters "Operating System" was typed out (the method was to hold down the "Alt" key, then press the number keys on the numeric keypad, then release the "Alt" key. One time was half a character, and it was typed eight times to finish these four characters!)

I want to ask who knows how these eight groups of numbers were calculated.


—————————————— willsort Moderation Record ——————————————
Modified original title: DOS Question for Consultation.
The original topic author did not appeal or modify within three days after the notice was issued, so the moderator modified it and imposed a point penalty.
Penalties include: deducting 3 points of points awarded for posting this topic, deducting 1 point of penalty points for title violation
—————————————— willsort Moderation Record ——————————————


[ Last edited by willsort on 2005-11-30 at 13:27 ]
Floor 2 Posted 2005-11-15 16:15 ·  中国 上海 杨浦区 电信
高级用户
★★★
Credits 916
Posts 377
Joined 2004-03-08 00:00
22-year member
UID 19523
Gender Male
Status Offline
Really, I don't know what encoding is used. It's best to have a simple algorithm. It's really great.

Unfortunately, the displayed text is still garbled. It can only be displayed under the Chinese system
Floor 3 Posted 2005-11-15 16:43 ·  中国 山西 太原 中移铁通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
23-year member
UID 19
Gender Male
Status Offline
Re king603:

In general, Chinese systems under DOS use the GB2312 character set national standard encoding. There are very few Chinese character systems that use larger character sets such as GBK or CJK. In GB code, Chinese characters are divided into first-level Chinese characters and second-level Chinese characters. The first-level ones are arranged in pinyin order, and the second-level ones are arranged according to strokes and the number of strokes. Although there is a certain pattern, strong memory of the encoding table is necessary for actual calculation, and it is generally not recommended.

And there have been many solutions for entering Chinese-named directories (or opening folders with Chinese file names) without using a Chinese system under DOS. Here is a link for you:

Old illness new medicine: Entering Chinese directories in non-Chinese environments
http://www.cn-dos.net/forum/viewthread.php?tid=16819

Of course, the existing solutions still cannot be completely achieved. For example, in a random environment containing many Chinese-named directories of the same length, but not telling which Chinese names they are, and only requiring entering a directory named "Target Directory", it is very difficult to achieve.

[ Last edited by willsort on 2005-11-30 at 13:29 ]
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 4 Posted 2005-11-15 19:54 ·  中国 广东 广州 海珠区 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
Originally posted by king603 at 2005-11-15 14:39:
I want to ask who knows how these eight groups of numbers are calculated.


You can obtain the character values of those "garbled codes" by querying the ASCII character table. Both DN (DOS Navigator) and the help files of QB/QBasic have ASCII tables. As for how to calculate the ASCII code values of each Chinese character, you can compile a small program to convert ASCII characters to numerical values.

If you don't rely on any tools, then you can only rely on memorizing the ASCII code values of those characters by rote -_-
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 5 Posted 2005-11-15 20:25 ·  中国 上海 宝山区 电信
高级用户
★★★
Credits 916
Posts 377
Joined 2004-03-08 00:00
22-year member
UID 19523
Gender Male
Status Offline
Can everyone give an example of conversion?

For example, how is the character "系" converted?
Floor 6 Posted 2005-11-16 01:36 ·  中国 广东 肇庆 端州区 电信
初级用户
Credits 22
Posts 10
Joined 2005-11-15 13:56
20-year member
UID 45294
Gender Male
Status Offline
Yeah, it would be best to give a few examples so that we all can learn from them!
Floor 7 Posted 2005-11-16 21:42 ·  中国 广东 广州 海珠区 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
Take QB as an example:
a$ = "系"
PRINT ASC(LEFT$(a$, 1)); ASC(RIGHT$(a$, 1))
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 8 Posted 2005-11-16 23:13 ·  中国 广东 肇庆 端州区 电信
初级用户
Credits 22
Posts 10
Joined 2005-11-15 13:56
20-year member
UID 45294
Gender Male
Status Offline
As shown in the figure:



Is there a formula that can be used to calculate these eight groups of decimal numbers?
Floor 9 Posted 2005-11-17 19:17 ·  中国 广东 广州 海珠区 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
Each character corresponds to an ASCII code, so the formula is to convert the ASCII character to the code.
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 10 Posted 2005-11-17 19:34 ·  中国 广东 肇庆 电信
初级用户
Credits 22
Posts 10
Joined 2005-11-15 13:56
20-year member
UID 45294
Gender Male
Status Offline
How to convert to code? What are the steps?
Please teach...
Thanks!
Floor 11 Posted 2005-11-22 13:58 ·  中国 广东 肇庆 电信
初级用户
Credits 22
Posts 10
Joined 2005-11-15 13:56
20-year member
UID 45294
Gender Male
Status Offline
Floor 12 Posted 2005-11-22 19:53 ·  中国 广东 广州 天河区 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 13 Posted 2005-11-22 21:09 ·  中国 广东 肇庆 电信
初级用户
Credits 22
Posts 10
Joined 2005-11-15 13:56
20-year member
UID 45294
Gender Male
Status Offline
It seems a bit related! But still not very understanding~~~~~~ (I'm too stupid~~?)

For example: In "操" = "178 217", if the result answer is "178 217", then, is there any other information as "known conditions" besides the character "操"? What are those so-called implicit "known conditions"? (I seem to have asked too abstrusely~~~) Or, is this result answer of "178 217" only computable by a computer and simply impossible to be calculated manually?
Floor 14 Posted 2005-11-23 14:19 ·  中国 江西 南昌 联通
初级用户
Credits 24
Posts 8
Joined 2005-11-23 12:22
20-year member
UID 45778
Status Offline
Floor 15 Posted 2005-11-23 14:24 ·  中国 江西 南昌 联通
初级用户
Credits 24
Posts 8
Joined 2005-11-23 12:22
20-year member
UID 45778
Status Offline
http://www.philosophyol.com/bbs/TopicOther.asp?t=5&BoardID=27&id=3394
Please look at the above area code table. The country has assigned a location code to each Chinese character: there are 2 numbers, the first is the area and the second is the position (nonsense?). If you want to calculate the desired number, first find a character in the table, for example, "藏" is in area 18, position 56, then add 160 respectively to get 178 and 216, which is actually the internal code of the Chinese character.
Forum Jump: