From: Simon Marlow Date: Tue, 7 Jul 2009 12:44:06 +0000 (+0000) Subject: add a comment about the non-workingness of CHARBUF_UTF16 X-Git-Tag: ghc-darcs-git-switchover~353 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=95ff1b673ad261f3fde2c1f89dd987b2a638dc78;p=ghc-base.git add a comment about the non-workingness of CHARBUF_UTF16 --- 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