From 87dbb737ede9b63a87cafe07abd58c509321eab6 Mon Sep 17 00:00:00 2001 From: Henning Guenther Date: Sun, 14 Feb 2010 14:02:55 -0800 Subject: [PATCH] Fix encoding range of UTF16 Ignore-this: 444de9225bcb43b6af883a9cdf5f352a Found due to better QuickCheck properties darcs-hash:20100214220255-a4fee-56b8388a1379774f3603405e144cdedead4a2edc --- Data/Encoding/UTF16.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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