From 2ec75e44bcc1747c7105900dbb241e9755ea0179 Mon Sep 17 00:00:00 2001 From: James Clark Date: Thu, 22 Jan 1998 08:22:40 +0000 Subject: [PATCH] Fix bug in utf8_encoding with surrogates --- expat/xmltok/xmltok.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/expat/xmltok/xmltok.c b/expat/xmltok/xmltok.c index 1d8a3549..c1f81aa9 100755 --- a/expat/xmltok/xmltok.c +++ b/expat/xmltok/xmltok.c @@ -117,7 +117,7 @@ int utf8_encode(const ENCODING *enc, int c, char *buf) buf[1] = (((c >> 12) & 0x3f) | 0x80); buf[2] = (((c >> 6) & 0x3f) | 0x80); buf[3] = ((c & 0x3f) | 0x80); - return 3; + return 4; } return 0; }