中国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-17 16:11
47,814 topics / 349,907 posts / today 4 new / 48,259 members
DOS疑难解答 & 问题讨论 (解答室) » How to calculate and type the internal code of Chinese characters under pure DOS to enter the Chinese folder
Printable Version  2,516 / 16
Floor1 king603 Posted 2005-11-15 14:39
初级用户 Posts 10 Credits 22
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 ]
Floor2 dato Posted 2005-11-15 16:15
高级用户 Posts 377 Credits 916
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
Floor3 willsort Posted 2005-11-15 16:43
元老会员 Posts 1,512 Credits 4,432
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 ]
Floor4 JonePeng Posted 2005-11-15 19:54
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
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 -_-
Floor5 dato Posted 2005-11-15 20:25
高级用户 Posts 377 Credits 916
Can everyone give an example of conversion?

For example, how is the character "系" converted?
Floor6 king603 Posted 2005-11-16 01:36
初级用户 Posts 10 Credits 22
Yeah, it would be best to give a few examples so that we all can learn from them!
Floor7 JonePeng Posted 2005-11-16 21:42
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
Take QB as an example:
a$ = "系"
PRINT ASC(LEFT$(a$, 1)); ASC(RIGHT$(a$, 1))
Floor8 king603 Posted 2005-11-16 23:13
初级用户 Posts 10 Credits 22
As shown in the figure:



Is there a formula that can be used to calculate these eight groups of decimal numbers?
Floor9 JonePeng Posted 2005-11-17 19:17
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
Each character corresponds to an ASCII code, so the formula is to convert the ASCII character to the code.
Floor10 king603 Posted 2005-11-17 19:34
初级用户 Posts 10 Credits 22
How to convert to code? What are the steps?
Please teach...
Thanks!
Floor11 king603 Posted 2005-11-22 13:58
初级用户 Posts 10 Credits 22
Floor12 JonePeng Posted 2005-11-22 19:53
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
Floor13 king603 Posted 2005-11-22 21:09
初级用户 Posts 10 Credits 22
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?
Floor14 plz45 Posted 2005-11-23 14:19
初级用户 Posts 8 Credits 24
Floor15 plz45 Posted 2005-11-23 14:24
初级用户 Posts 8 Credits 24
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.
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023