[Haskell-cafe] Is Haskell capable of matching C in string
taruti at taruti.net
Sat Jan 23 06:43:39 EST 2010
Excerpts from John Millikin's message of Fri Jan 22 19:40:58 +0200 2010:
> Correct me if I'm wrong, but ByteStrings can't contain non-ASCII
> values, right? I'm looking for something like this pseudo-C:
> typedef void (*Callback)(const uint32_t *chars, size_t n_chars, void *);
> WriterState *new_state (Callback, void *);
> I tried using the Text type, but its conversions to Ptr Word16 are all
> O(n) -- not much better than String.
Are you using unicode on the C side with wchar_t?
You can have utf-8 inside ByteStrings.
- Taru Karttunen
More information about the Haskell-Cafe