Sat, 03 Feb 2001 01:21:40 +0900, Tomohiro KUBOTA <[EMAIL PROTECTED]> pisze:

> Though I don't know about Haskell, Java automatically convert
> strings from/to locale-encoding for every I/O.

The same will be true for Haskell. For file contents it will be
possible to choose the conversion, but I don't plan it for filenames.
If somebody really wants to use a different encoding for filenames,
he can use a system-specific way to change the C locale. When some
OS uses Unicode internally for filenames, the concept of choosing an
encoding for filenames does not exist, so generally mapping between
filenames and Unicode is internal to the given Haskell implementation.

> Thus, we don't need to be aware of the internal Unicode.

I don't understand: of course we must be aware, because filenames
on the language side are in Unicode and we must convert them to
whatever the OS needs somehow, keeping in mind that there can be
another conversion between the kernel and the physical filesystem.

> > An alternative design would allow 1. as an additional option, preferable
> > using wchar_t instead of UTF-8. 
> 
> wchar_t cannot be used, because it is incompatible with char.

I meant a separate function. OK, using UTF-8 with new options for
the same fopen() function can be considered less ugly.

> > I think that we must live with the fact that kernel-side encodings are
> > specified and implemented very differently from libc encodings. There are
> > modules for particular encodings and mount options telling which encoding
> > to use.
> 
> Really?  Isn't it possible to use libc's iconv()?

There is no libc in kernel. I don't know how much effort would be to
port iconv from libc to kernel.

> > I think 4. is the most compatible with the current world.
> 
> Note that 2. and 4. means that kernel must know software's LC_CTYPE locale.

No: kernel can be informed about the encoding of filenames in a different
way, e.g. mount options.

-- 
 __("<  Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK

-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/

Reply via email to