Sat, 02 Sep 2000 15:37:50 -0700, Joe English <[EMAIL PROTECTED]> pisze:

> > I know. How to convert between the default multibyte locale and
> > Unicode on such systems?
> 
> As far as I can tell, there's no way to do so in Standard C without
> investigating the details of each particular implementation.

I know. That's why I am using a non-portable method. I am asking
about a method generally more portable in practice...

In case GHC is ported to a system when wchar_t is not Unicode, local
conversions will just have to be implemented differently. mbrtowc and
wcrtomb seem to be the most direct way on Linux and should work on some
other systems too, even without magic knowledge about charset names.

What is frustrating about glibc's implementation of iconv is that
it uses the same internal format as one of my internal formats for C
implementations (an array of words in native endianness) but does not
provide that format externally. Best match is the same in big endian.
To use this iconv, texts would have to be endian-swapped twice on
input and twice on output, and both my and iconv's framework would
use a separate "step" with its own buffers for each swapping.

I understand that using native endianness in external format is
a bad idea, but it should not imply that a basic operation needs
unnecessary workarounds. libiconv uses the same encoding internally
and does provide it externally too.

I am beginning to hate standards which left every detail as
implementation-defined.

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


Reply via email to