Unicode

Marcin 'Qrczak' Kowalczyk qrczak@knm.org.pl
25 May 2001 20:07:25 GMT


Sat, 26 May 2001 03:17:40 +1000, Fergus Henderson <fjh@cs.mu.oz.au> pisze:

> Is there a way to convert a Haskell String into a UTF-16
> encoded byte stream without writing to a file and then
> reading the file back in?

Sure: all conversions are available as memory to memory conversions
for direct use.

My conversion type is parametrized by input and output character types,
so you can even define UTF-16 as giving [Word16]. But [Word8] must be
used for handles, so I think that in practice conversions are generally
between [Char] and [Word8].

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK