From 6ff28fc3b12140dfa8539e0cb236a15b3eac089e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 3 Oct 2009 08:51:07 +0000 Subject: * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Allow CESU-8 surrogate value encoding. * libc/stdlib/wctomb_r.c (__utf8_mbtowc): Allow CESU-8 surrogate value decoding. --- newlib/libc/stdlib/mbtowc_r.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'newlib/libc/stdlib/mbtowc_r.c') diff --git a/newlib/libc/stdlib/mbtowc_r.c b/newlib/libc/stdlib/mbtowc_r.c index a791692be..0fa57fafd 100644 --- a/newlib/libc/stdlib/mbtowc_r.c +++ b/newlib/libc/stdlib/mbtowc_r.c @@ -295,12 +295,6 @@ _DEFUN (__utf8_mbtowc, (r, pwc, s, n, charset, state), tmp = (wchar_t)((state->__value.__wchb[0] & 0x0f) << 12) | (wchar_t)((state->__value.__wchb[1] & 0x3f) << 6) | (wchar_t)(ch & 0x3f); - /* Check for invalid CESU-8 encoding of UTF-16 surrogate values. */ - if (tmp >= 0xd800 && tmp <= 0xdfff) - { - r->_errno = EILSEQ; - return -1; - } *pwc = tmp; return i; } -- cgit v1.2.3