Upper case filenames
Sat Jul 31 18:34:00 GMT 1999
Earnie Boyd wrote:
> --- Joshua Rosen <email@example.com> wrote:
> > Ron House wrote:
> > Actually, doesn't DOS write and present file-names as uppercase?
> > Wouldn't that make the Linux module's file-name-mapping `incorrect',
> > and Cygwin's `correct'?
> That may be true of DOS but the DOS console window would present them in the
> case they were created. However, the original poster was asking about the 8.3
> filename!! How is it that you get the 8.3 DOS filename with cygwin?
I brought up DOS exactly because he said `8.3';)
> As far as I remember the cygwin product is case SENSITIVE. For instance a file
> prog1.c would be interpreted by gcc to be a C program while PROG1.C would be a
> C++ program. Try doing `find -name proc1.c' when the filename is actually
> PROG1.C. The FAT filesystem and the default for the NTFS filesystem is case
> insensitive but case preserving for the long filenames but store the DOS 8.3
> names in UPPERCASE
Yes, quite so....
The Windows console window presents file-names in whatever case they're created
is true, but, in addition to that it doesn't present the 8.3 names;)...:
+DOS and win16 applications always create uppercase file-names
+when a Windows file has a `long' file-name, the accompanying 8.3 file-name
that's created for it is uppercase
>, so your point that Linux is incorrect would be correct if
> Linux is showing the 8.3 DOS filename in lowercase but I'm not that familiar
> with FAT emulation on Linux.
If you mount as type=msdos, all files are mapped to lower-case names.
If you mount as VFAT, all -mixed-case- names have their Windows cases preserved
(ie: `foObAr' is mapped to `foObAr'); all-caps and all-lower-case names are
mapped to all-lowercase (ie: `FOOBAR' is mapped to `foobar')--I'm guessing that
the reasoning behind this is the same as that behind the default behaviour of
downcasing of all-caps file-names in Windows' Explorer (I turned that off a long
time ago with TweakUI...): the system assumes that it is uppercase because it
was created by, an old DOS/win16 app, not because the user wanted it that way.
While GCC is case-sensitive, Cygwin doesn't appear to be inherently
case-sensitive (try opening/viewing two files whos names differ only in case,
like `ls foo FOO').
I don't believe that Cygwin should `make it look like linux'--it should use the
file-names returned by the system that it's running on.
I don't recall if TweakUI changes the `downcase everything' behaviour in
Windows, or just in Explorer--I'll look at it next time I reboot (though I
imagine that anyone interested can look for themselves, sooner;)).
Maybe the problems with case could be solved, locally, by running all of the
file-names through `tr [:uppercase:] [:lowercase:]'--I'd favour that over
munging the case information in the base system, because the latter approach
-completely- disables it, while the former would allow you to use whichever
mapping scheme you want.
Want to unsubscribe from this list?
Send a message to firstname.lastname@example.org
More information about the Cygwin