msdos fs bug? (comma in filename)

Albert Cahalan (albert@ccs.neu.edu)
Thu, 17 Oct 1996 20:17:30 -0400 (EDT)


From: Gerd Knorr <kraxel@cs.tu-berlin.de>
>
> These days I wrote a small script which copies a brunch of html-files to
> my DOS-Partition (normal msdos fs, not vfat). One of these files has a
> comma in the filename. I can copy it, no problem. But if I boot DOS next
> time scandisk complains about that file. I get the file 'repeared' as
> c:\file0000.chk, the content of the file is ok. So it seems it is the
> comma in the filename which cauces scandisk to complain (chkdsk does
> *not*, BTW). Accessing the file does'nt work either, if I tell scandisk he
> should not "repear" it (with DOS, no problem with linux).
>
> So, if MS-DOS can't handle commas in filenames, linux msdos-fs should'nt
> create such filenames, IMHO.

Acceptable msdos filenames are not well defined. You can create
many weird filenames from the DOS command line using a command
such as "echo > filename.ext", but using Alt-NumPad to enter the
ASCII codes for strange stuff. I used that to verify the odd way
DOS treats files that start with 0xE5 (the 0xE5 is stored as 0x05).
Type "229" on the number pad while you hold down Alt to get 0xE5.

To be sure, write a DOS program that tries to create names with
all 256 characters. See what works and what fails using the raw
DOS system call - then watch scandisk puke on valid names!

This one is good: "\xE5\xE5_NAME.ODD". Look at the directory with
a disk editor to discover the evil truth.