+2008-08-03 Bruno Haible <bruno@clisp.org>
+
+ * x-python.c (mixed_string_buffer_append): Replace a lone high
+ surrogate with U+FFFD.
+ Reported by Yann <asterix@lagaule.org>
+ via Santiago Vila <sanvila@unex.es>.
+
2008-07-19 Bruno Haible <bruno@clisp.org>
* gnu/gettext/GetURL.java: Don't output anything to standard error.
if (c >= UNICODE (0xd800) && c < UNICODE (0xdc00))
bp->utf16_surr = UNICODE_VALUE (c);
+ else if (c >= UNICODE (0xdc00) && c < UNICODE (0xe000))
+ {
+ /* A half surrogate is invalid, therefore use U+FFFD instead. */
+ mixed_string_buffer_append_unicode (bp, 0xfffd);
+ }
else
mixed_string_buffer_append_unicode (bp, UNICODE_VALUE (c));
}