diff --git a/Data/Encoding/UTF16.hs b/Data/Encoding/UTF16.hs index 25bbb7b..baa94fd 100644 --- a/Data/Encoding/UTF16.hs +++ b/Data/Encoding/UTF16.hs @@ -79,4 +79,4 @@ instance Encoding UTF16 where return (c:cs) Right bom -> decode bom decode enc = untilM sourceEmpty (decodeChar enc) - encodeable _ c = c <= '\x10FFFF' \ No newline at end of file + encodeable _ c = (c > '\xDFFF' && c <= '\x10FFFF') || c < '\xD800' \ No newline at end of file