[MLton] Unicode / WideChar

Florian Weimer fw@deneb.enyo.de
Sun, 27 Nov 2005 12:33:48 +0100


* Wesley W. Terpstra:

> On Tue, Nov 22, 2005 at 09:52:23PM +0100, Florian Weimer wrote:
>> * Andreas Rossberg:
>> 
>> > That may well be true. I had the SML library spec and its OS.Path in 
>> > mind, which requires file names to be "normalized" to lower case on 
>> > Windows, in order to do path resolution (independent of their actual 
>> > existence).
>> 
>> This is wrong anyway.  Windows applications are expected to be
>> case-preserving, and some Windows file systems are even
>> case-sensitive.
>
> Could you give an example?

| Welcome to the Interix UNIX utilities.
| 
| DISPLAY=localhost:0.0
| % cd Desktop
| % pwd
| /dev/fs/C/Dokumente und Einstellungen/Administrator/Desktop
| % touch a A
| % ls ?
| A       a
| % rm a
| % ls ?
| A
| % rm a
| rm: a: No such file or directory
| %

(The new default is case-preserving, case-insensitive, however, but
this is configurable.)

> What things go wrong on these file systems when you do what the basis
> describes? Right now MLton makes paths canonical as the basis requires.

I think you can't access them if you use a canonical name.

Such things can happen more easily when you use network file systems,
I suppose.