Hi Eric and Tom, > Both functions are implemented in driver TSRs like DOSLFN, which > split long Unicode file names into short UTF-16 fragments which > are stored in special "invalid" directory entries to hide them > from normal DOS. Each file with a long name also is associated > to one short named directory entry, which is the one which is > actually used by the DOS kernel. > > There are also some "kernel LFN hooks" implemented in our > source, but I do not know for which driver they were made > and I doubt that you can still compile a kernel with those > old LFN hooks enabled. They were rarely used and the kernel > has changed considerably since then.
ok, got it :-( Microsoft created ad-hoc functions to deal with UNICODE filenames and files (fopen_s, fclose_s,...). Linux allows the caller of fopen() to inject UTF8 names: -------------------------------------------------------------- #include<stdio.h> int main() { /* UTF8 data for ??.txt (?? -> chinese characters) */ unsigned char fname[20]={0xE6, 0x98, 0x8E, 0xE5, 0xA4, 0xA9, 0x2E, 0x74, 0x78, 0x74, 0x00}; FILE *fp; fp = fopen((char *)fname, "w"); if(fp != NULL) printf("\nSuccess"); else printf("\nError"); fclose(fp); -------------------------------------------------------------- I hope it wouldn't be too much difficult adding UTF8 support to my port, because I really need Unicode filenames support. (CDS_MAX will have to be enlarged). > PS: Microsoft still holds patents for some of the more > (CPU/disk) efficient algorithms / tricks for juggling > with LFN fragments on disk. ok Enrico ------------------------------------------------------ Leggi GRATIS le tue mail con il telefonino i-modeĀ di Wind http://i-mode.wind.it/ ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel