Re: ANN: H98 FFI Addendum 1.0, Release Candidate 13
Ross Paterson <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.ffi |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Oct 31, 2003 at 06:45:41PM +1100, Manuel M T Chakravarty wrote: > (2) The inclusion of John Meacham's `CWString' and > `CLString' routines. However, I propose to make the > localised versions (aka `CLString') the default and > rename the previous (8bit-based) routines to use a > `CAString' suffix, where the `A' stands for ASCII. Making the Right Thing the default, though it may cost more, seems appropriate. In the sentence The marshalling takes the current Unicode encoding on the Haskell side into account. (which seems to have been there before), "current" seems wrong, since the Haskell side is constant. How about something like The marshalling converts each Haskell character, representing a Unicode code point, to one or more bytes in a manner determined by the current locale. and dropping the later sentence about the locale. What happens if one attempts to convert a Char that has no encoding in the current locale? It might be worth emphasizing that the Len is the number of bytes rather than Chars. In the part about the single-byte versions, it might be worth tightening the warning to say that these preserve only the first 256 values of Char. (That is the Latin-1 subset, so calling them ASCII seems a misnomer.)