RE: Lfn.e
- Posted by rforno at tutopia.com Dec 24, 2002
- 394 views
My 'translation' program uses code page 850. I think it is used by most Western languages. Correct me if I'm wrong. Regards. ----- Original Message ----- From: Juergen Luethje <eu.lue at gmx.de> Subject: Re: Lfn.e Bob wrote: > Juergen, > > I started writing an app to test Lfn.e and came upon this: Many thanks. > Several files I was trying to process had been saved as .txt from Internet > Explorer and contained the '@' sign in their names. That is what is shown > in a folder by Windows. > I verified with a disk editor that the '@' sign was #AE on disk. That is strange. As Ricardo already wrote, normally '@' is #40. > However, DOS returns that character as an underscore ( #5F ). > lfn_dir("discov*.txt") returned a list which contained: > > "Discover_ Platinum Account Statement 09-26-02.txt" > > Note the '_' instead of '@'. lfn_open() failed to open this file. To test this on my system, I created a file by hand, using Windows Explorer (Win 98), with the name: "äÄöÖüÜß at 123.txt" I don't know how the characters in this filename look on your system. The first 7 chars are spezial German characters whith the codes #84, #8E, #94, #99, #81, #9A, #E1 on codepage 850. On a Win 98 DOS box, lfn_dir("*.*") showed the name correctly, and lfn_open() opened the file. On plain MS-DOS 7.10, the filename consisted of the first 6 characters (all uppercase) & '~1', as usual. lfn_dir("*.*") again showed the name correctly, and lfn_open() opened the file. > This is very likely a code page problem but I don't have time to research > it now. Perhaps Igor could help? Hmm.. I always thought, that the standard ASCII characters (#00-#7F) are the same on all codepages. If this is right, then there shouldn't be a codepage problem with '@'. What codepage are you using? (type 'chcp' at the DOS prompt) My LFN functions all use the DOS interrupt #21. Is this interrupt on your system handled by MS-DOS, or by 4DOS? Did the program in Ricardo's text utilities solve the problem for you? I also downloaded it, but I couldn't see, what DOS codepage it supports. I searched Ralph Brown's DOS interrupt list, but didn't find anything like a 'translate_ANSI_to_current_OEM_codepage()' function. But if there is need for it, I can provide tables for translation from/to ANSI on the one hand, and DOS codepages 437, 850, 852, 863, 865, and 866 on the other hand ... next year.[1] I really hope, that such a translation normally isn't required for my LFN functions. At least, for MS-DOS 7.10 and codepage 850 it doesn't seem to be necessary. Sorry that I can't help you more at the moment. > I will mail you the test report. > Thanks, > > Bob I received it, thank you again. > P.S. command.com's "dir" showed it like above; 4DOS, which I use every > day, would only show the alias (short form). Regards, Juergen --------------------- [1] BTW, to everyone: Merry Christmas and a Happy New Year. Frohe Weihnachten und ein gutes Neues Jahr. Prettige Kerstdagen en een Gelukkig Nieuwjaar. Joyeux Noël et Bonne Année. Feliz Navidad y Próspero Año Nuevo. Buon Natale e felice Anno Nuovo. ==^^=============================================================== This email was sent to: rforno at tutopia.com