X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Rod Pemberton" Newsgroups: comp.os.msdos.djgpp Subject: Re: Bug in findfirst/findnext: mangles certain characters. Date: Sat, 27 Feb 2010 15:32:14 -0500 Organization: Aioe.org NNTP Server Lines: 28 Message-ID: References: <2PydnQe72P4H_BrWnZ2dnUVZ_vmdnZ2d AT giganews DOT com> NNTP-Posting-Host: pldq+kT97bAAp/ObDwnZyQ.user.speranza.aioe.org X-Complaints-To: abuse AT aioe DOT org X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1983 X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Microsoft Outlook Express 6.00.2800.1983 X-Priority: 3 X-MSMail-Priority: Normal Bytes: 2091 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Robbie Hatley" wrote in message news:2PydnQe72P4H_BrWnZ2dnUVZ_vmdnZ2d AT giganews DOT com... > > This is broken, because it causes rename attempts to fail, > because no files actually exist with the altered versions > of their names given by findfirst/findnext. > I'm not sure if this suggestion will help or not. At best, if it works for you, it's a work around, not a fix. For a personal utility I wrote, I chose to use SFNs via _dos_findfirst and _dos_findnext. I seem to recall having problems with findfirst and findnext. After I've _dos_findfirst/next returns the correct SFN, I call the LFN API 0x7160 function via DPMI to get the correct LFN. At which point, you may be able to use rename() or _rename() or LFN API 0x7156 function to rename, assuming the LFN API correctly returns these characters... Personally, I would like to experiment with this. I'm not part of the DJGPP development team. But, is it too much to ask if you could post an example that demonstrates a failure? And, is this in pure DOS or a Windows command console? 98? XP? Which DJGPP version? 2.03? 2.04? Do I need to set a different code page? How did you create the names with the problematic characters in the first place? Etc. Rod Pemberton