From 95ff1b673ad261f3fde2c1f89dd987b2a638dc78 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Tue, 7 Jul 2009 12:44:06 +0000 Subject: [PATCH] add a comment about the non-workingness of CHARBUF_UTF16 --- GHC/IO/Buffer.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/GHC/IO/Buffer.hs b/GHC/IO/Buffer.hs index 18304fe..aaa3f58 100644 --- a/GHC/IO/Buffer.hs +++ b/GHC/IO/Buffer.hs @@ -77,9 +77,17 @@ import Foreign.Storable -- * a Char buffer consists of *valid* UTF-16 or UTF-32 -- * only whole characters: no partial surrogate pairs --- #define CHARBUF_UTF16 #define CHARBUF_UTF32 +-- #define CHARBUF_UTF16 +-- +-- NB. it won't work to just change this to CHARBUF_UTF16. Some of +-- the code to make this work is there, and it has been tested with +-- the Iconv codec, but there are some pieces that are known to be +-- broken. In particular, the built-in codecs +-- e.g. GHC.IO.Encoding.UTF{8,16,32} need to use isFullCharBuffer or +-- similar in place of the ow >= os comparisions. + -- --------------------------------------------------------------------------- -- Raw blocks of data -- 1.7.10.4