| 
 
lovefreedos 
初级用户
 
  
 
  
  
积分 30 
发帖 7 
注册 2006-7-21 
状态 离线
 | 
『楼 主』:
 请教为什么读中文长文件名出错!
 
使用 LLM 解释/回答一下
  
文件绝对地址如"D:\新建文件夹\ma.txt"放入到temp.txt文件中 
然后打开文件temp.txt读出"D:\新建文件夹\ma.txt"这个串 
然后FILE *fp=fopen("D:\新建文件夹\ma.txt","r");不能打开文件 
如果中文文件名是四个以内可以打开,我也装了doslfn,希望高手指点,多谢 
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. 
    
 
  
 |   
 | 
  2006-7-21 23:47 | 
  
 | 
 | 
 
fastslz 
铂金会员
 
        DOS一根葱
  
 
积分 5493 
发帖 2315 
注册 2006-5-1 来自 上海 
状态 离线
 | 
『第 2 楼』:
 
 
使用 LLM 解释/回答一下
  
装了中文代码CP936UNI.TBL文件了吗? 
DOSLFN.COM /Z CP936UNI.TBL 
Have you installed the Chinese code CP936UNI.TBL file? 
DOSLFN.COM /Z CP936UNI.TBL 
    
 
  
 |   
 | 
  2006-7-21 23:58 | 
  
 | 
 | 
 
lovefreedos 
初级用户
 
  
 
  
  
积分 30 
发帖 7 
注册 2006-7-21 
状态 离线
 | 
 | 
  2006-7-22 00:04 | 
  
 | 
 | 
 
fastslz 
铂金会员
 
        DOS一根葱
  
 
积分 5493 
发帖 2315 
注册 2006-5-1 来自 上海 
状态 离线
 | 
『第 4 楼』:
 
 
使用 LLM 解释/回答一下
  
我还真没碰到过这个情况,经常和DOS打交道平时已习惯了不建长文件名了 
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. 
    
 
  
 |   
 | 
  2006-7-22 00:16 | 
  
 | 
 | 
 
Wengier 
系统支持
 
              “新DOS时代”站长
  
 
积分 27736 
发帖 10521 
注册 2002-10-9 
状态 离线
 | 
『第 5 楼』:
 
 
使用 LLM 解释/回答一下
  
FILE *fp=fopen("D:\新建文件夹\ma.txt","r"); 
 
你用的是什么C编译器?许多C编译器都是不支持长文件名功能的,更不用说中文长文件名了。 
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和雨露,谢谢!) 
 
  |   
 | 
  2006-7-22 00:30 | 
  
 | 
 | 
 
lovefreedos 
初级用户
 
  
 
  
  
积分 30 
发帖 7 
注册 2006-7-21 
状态 离线
 | 
『第 6 楼』:
 
 
使用 LLM 解释/回答一下
  
我用的是djgpp它能读取英文长文件名,四个以内的中文文件名能识别,超过四个就不行了! 
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. 
    
 
  
 |   
 | 
  2006-7-22 09:33 | 
  
 |