changeset 89842:b5f22f538c1f

(decode_coding_utf_16): Fix handling of surrogate pare.
author Kenichi Handa <handa@m17n.org>
date Thu, 04 Mar 2004 07:49:18 +0000
parents dba335b3b492
children 69acbaa5b570
files src/coding.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Thu Mar 04 00:55:07 2004 +0000
+++ b/src/coding.c	Thu Mar 04 07:49:18 2004 +0000
@@ -1495,7 +1495,7 @@
 	    {
 	      c = ((surrogate - 0xD800) << 10) | (c - 0xDC00);
 	      CODING_UTF_16_SURROGATE (coding) = surrogate = 0;
-	      *charbuf++ = c;
+	      *charbuf++ = 0x10000 + c;
 	    }
 	}
       else