![]() |
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-26 20:39 |
47,812 topics / 349,912 posts / today 2 new / 48,264 members |
| DOS汉化世界 & 中文系统 (中文化室) » Ask why there is an error when reading Chinese long file names! |
| Printable Version 1,659 / 5 |
| Floor1 lovefreedos | Posted 2006-07-21 23:47 |
| 初级用户 Posts 7 Credits 30 | |
|
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.
|
|
| Floor2 fastslz | Posted 2006-07-21 23:58 |
| 铂金会员 Posts 2,315 Credits 5,493 From 上海 | |
|
Have you installed the Chinese code CP936UNI.TBL file?
DOSLFN.COM /Z CP936UNI.TBL |
|
| Floor3 lovefreedos | Posted 2006-07-22 00:04 |
| 初级用户 Posts 7 Credits 30 | |
| Floor4 fastslz | Posted 2006-07-22 00:16 |
| 铂金会员 Posts 2,315 Credits 5,493 From 上海 | |
|
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.
|
|
| Floor5 Wengier | Posted 2006-07-22 00:30 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
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. |
|
| Floor6 lovefreedos | Posted 2006-07-22 09:33 |
| 初级用户 Posts 7 Credits 30 | |
|
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.
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |