
6 Nov
2010
6 Nov
'10
1:08 p.m.
On 11/6/10 6:38 AM, C K Kashyap wrote:
Thanks a lot Gregory and Daniel,
I think I'll go with the "mapM_ (putWord8 . fromIntegral . ord)" approach.
If your string has any chance of containing Unicode characters then you will want to use the "encode" function in the module "Codec.Binary.UTF8.String" in the package "utf8-string", so that the code becomes mapM_ putWord8 . encode Cheers, Greg