num...@deathwyrm.com writes:

Jarkko Hietaniemi wrote:
> > > So are "install" and "INSTALL" the same file? What about
> > > "ınstall" and "İNSTALL"? Does it matter what locale you're in?
> > > How about german "ß" and "SS"?
> > > > I agree. The filesystem should not attempt to change names. Are
> > "cafe" and "café" the same word? The Englishman says yes, the
> > Frenchman says no. Just leave it alone.
>
> Aaah, but there's storage *and* retrieval... (to leave it alone vs.
> do you have blah?) Thusly the difference between case-ignorant and
> case-forgiving.

I'm not saying I would implement a filesystem case-insensitive. But if
I did, I'd do it by storing filenames verbatim.  On retrieval, I'd
loop over files for an exact match first.  Failing that, I'd loop over
again and call the current locale's toupper() on both sides before
comparing.

So if I have a file called INSTALL then I can (probably) open it as
install to edit it.  But then if I save it as install, the very name I
opened it as, it'll create a separate file with that exact name rather
than overwriting the one I opened?  That sounds pretty hateful.

And what happens if multiple files match case-insensitively?  Suppose I
have INSTALL and Install -- when I tried to open (the non-existent)
install which one would I get?

But that's just me.

You can get something similar to this in Bash by making tab-completion
case-insensitive.  That way you can get assistance if you can't remember
the case of a file, but this is only at the interface level (the program
gets the original filename), you get to see the file's actual name
before committing to it, and it's your choice to do this (it isn't
inflicted on other users of the file-system).

Smylers

Reply via email to