I want to call a foreign C function that takes a UTF-8 encoded string as one
of its arguments (and there's also a version of the function that receives
UTF-16). Can someone point me to documentation or examples of how this would
be done? AFAICT (reading the FFI spec) marshalling a String to a
On 01 September 2004 10:16, Bayley, Alistair wrote:
I want to call a foreign C function that takes a UTF-8 encoded string
as one of its arguments (and there's also a version of the function
that receives UTF-16). Can someone point me to documentation or
examples of how this would be done?
On Wed, Sep 01, 2004 at 10:16:23AM +0100, Bayley, Alistair wrote:
I want to call a foreign C function that takes a UTF-8 encoded string as one
of its arguments (and there's also a version of the function that receives
UTF-16). Can someone point me to documentation or examples of how this would
On Wed, Sep 01, 2004 at 11:13:23AM +0100, Ross Paterson wrote:
On Wed, Sep 01, 2004 at 10:16:23AM +0100, Bayley, Alistair wrote:
I want to call a foreign C function that takes a UTF-8 encoded string
as one of its arguments (and there's also a version of the function
that receives UTF-16).
I have implemented code to do this which I think is better than
John Meacham's, because it (a) handles all UTF8 sequences
(up to 6 bytes); (b) checks for errors as UTF8 decoders are
supposed to do; (c) lets you determine if there is an error
without having to seq the entire list. Here is a link:
From: George Russell [mailto:[EMAIL PROTECTED]
http://www.haskell.org//pipermail/glasgow-haskell-users/2004-April/006
564.html
Thanks George, this looks useful.
There are some things I want to clarify...
module UTF8(
toUTF8,
-- :: String - String
-- Converts a String
On Wed, Sep 01, 2004 at 11:13:23AM +0100, Ross Paterson wrote:
On Wed, Sep 01, 2004 at 10:16:23AM +0100, Bayley, Alistair wrote:
I want to call a foreign C function that takes a UTF-8 encoded string as one
of its arguments (and there's also a version of the function that receives
UTF-16).