> I think that current locale settings (locale(7)) should be used as
> default value.

Software on Unix like systems, at least Linux, tends to use utf-8 for encoding of filenames nowadays, but there's no global enforcement for this. The kernel and libc treat paths just as byte strings. I guess OS X has some enforcement law to make everything use utf-8. Windows afaik stores the used encoding in the filesystem, which should make it more clear which encoding to assume (and might even do the transcoding for you, not sure).

I think you can't really assume locale settings for changing this behaviour; if you do, you're fine as long as you don't change the locale for the lifetime of a particular filesystem. Since you're inevitable also going to deal with filesystems written with different encoding assumptions sometimes.

Probably there's no other way to deal with it than the same way you deal with textual file ports: specify the encoding when opening the port. Meaning, give the encoding when calling |open-directory|. Maybe have another Gambit startup flag to set the default. (Gambit doesn't check the locale for file ports, why should it use the locale for directory ports?)

(One could argue that if the encoding is unknown, input/output procedures should return u8vector's instead of strings, and accept u8vectors instead of strings.)

Christian.

(This is my first mail to a mailing list sent from Gmail, going to see whether lines are too long. If they are, what are other Gmail users doing about it?)