Use Unicode private-use characters for roundtripping
authorMax Bolingbroke <batterseapower@hotmail.com>
Wed, 18 May 2011 08:41:49 +0000 (09:41 +0100)
committerMax Bolingbroke <batterseapower@hotmail.com>
Wed, 18 May 2011 08:41:49 +0000 (09:41 +0100)
commit4c889c7daa98daff7aec5c0e4ccf491f25f5d10c
tree0d2ff9e43fddee795d5055d97e03e053d800846b
parent509f28cc93b980d30aca37008cbe66c677a0d6f6
Use Unicode private-use characters for roundtripping

This replaces the previous scheme (which used lone surrogates). The reason is that
there is Haskell software in the wild (i.e. the text package) that chokes on Char values
that do not represent Unicode characters.

This new approach will not work correctly if the reserved private-use characters are
actually encountered in the input, but we expect this to be rare.
GHC/Foreign.hs
GHC/IO/Encoding.hs
GHC/IO/Encoding/Failure.hs
GHC/IO/Encoding/Types.hs
GHC/IO/Handle/Text.hs