H98 FFI Addendum 1.0, Release Candidate 15

Simon Marlow simonmar at microsoft.com
Wed Nov 12 06:49:06 EST 2003


 
> And here now a probably naive question of mine: Does the
> notion of Marlow sensibility coincide with platforms that
> follow ISO/IEC 10646?

We don't want to restrict the standard to sensible systems, because that
rules out Windows :-).  On Windows, wchar_t is UTF-16, which is a
profoundly silly situation and seems to be the main reason that UTF-16
exists at all, but there's not much we can do about that.

So, the standard should say that the system converts appropriately
between Haskell's Unicode Char and whatever the system's encoding for
wchar_t is.  We don't want castCharToCWchar, because the encoding of a
Char into wchar_t might result in multiple wchar_ts.

In practice, I'm not sure we'll have the energy to implement this
properly.  We might get around to implementing a UTF-16 conversion for
Windows, but for Unix systems I imagine we'll restrict ourselves to
sensible systems.

Cheers,
	Simon



More information about the FFI mailing list