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-25 05:43
中国DOS联盟论坛 » DOS汉化世界 & 中文系统 (中文化室) » Ask why there is an error when reading Chinese long file names! View 1,564 Replies 5
Original Poster Posted 2006-07-21 23:47 ·  中国 吉林 吉林市 教育网
初级用户
Credits 30
Posts 7
Joined 2006-07-21 14:39
19-year member
UID 58974
Status Offline
The absolute file address such as "D:\New Folder\ma.txt" is put into the temp.txt file. Then open the temp.txt file to read the string "D:\New Folder\ma.txt". Then FILE *fp=fopen("D:\New Folder\ma.txt","r"); cannot open the file. If the Chinese file name is within four, it can be opened. I have also installed doslfn. Hope an expert can give guidance, thanks.
Floor 2 Posted 2006-07-21 23:58 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
Have you installed the Chinese code CP936UNI.TBL file?
DOSLFN.COM /Z CP936UNI.TBL
Floor 3 Posted 2006-07-22 00:04 ·  中国 吉林 吉林市 教育网
初级用户
Credits 30
Posts 7
Joined 2006-07-21 14:39
19-year member
UID 58974
Status Offline
Floor 4 Posted 2006-07-22 00:16 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
I really haven't encountered this situation before. I often deal with DOS and have been used to not creating long filenames in daily life.
Floor 5 Posted 2006-07-22 00:30 ·  加拿大 Bell
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
FILE *fp = fopen("D:\\新建文件夹\\ma.txt", "r");

What C compiler are you using? Many C compilers do not support long filename features, let alone Chinese long filenames.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 6 Posted 2006-07-22 09:33 ·  中国 吉林 吉林市 教育网
初级用户
Credits 30
Posts 7
Joined 2006-07-21 14:39
19-year member
UID 58974
Status Offline
I'm using djgpp. It can read English long filenames. It can recognize Chinese filenames with fewer than four characters, but not when there are more than four.
Forum Jump: