I'm using UCS-4, with uint32_t.
On Sat, Jan 23, 2010 at 03:43, Taru Karttunen <tar...@taruti.net> wrote: > 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 > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe