H98 FFI Addendum 1.0, Release Candidate 15
John Meacham
john at repetae.net
Thu Nov 13 22:06:57 EST 2003
On Fri, Nov 14, 2003 at 01:57:41PM +1100, Manuel M T Chakravarty wrote:
> These marshalling routines convert Haskell's Unicode
> representation for characters into the platform-specific
> encoding used for \code{wchar\_t} and vice versa. In
> particular, on platforms that represent \code{wchar\_t}
> values according to the encoding specified by ISO/IEC
> 10646, this conversion reduces to a simple type cast
> without any alteration of the character values. For all
> other platforms, the exact rules of the conversion are
> platform-specific and not further defined in this report.
>
> Does anybody have any suggestions for improving this
> explanation?
I don't think we need to say anything special, the conversion to wchar_t
* is just as defined as that to char *. it is a locale dependent
operation just like withCString and friends. one would make their
decision as to which to use based on the library they are trying to bind
too, if a wchar_t interface is supported it should be prefered because
it is more likely to preserve character codes.
John
--
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john at foo.net
---------------------------------------------------------------------------
More information about the FFI
mailing list