[PATCH 14/14] Fix UTF-16 surrogate handling.
Stefan Liebler
stli@linux.vnet.ibm.com
Thu Feb 25 12:57:00 GMT 2016
On 02/23/2016 06:42 PM, Joseph Myers wrote:
> If this is user-visible in a release, there should be a bug filed in
> Bugzilla (if there isn't one already open), and a testcase added to the
> testsuite.
>
okay.
I've filed the bug
"Bug 19727 - Converting from/to UTF-xx with iconv() does not always
report errors on UTF-16 surrogates values."
(https://sourceware.org/bugzilla/show_bug.cgi?id=19727)
This patch also adds a new testcase, which checks UTF conversions with
input values in range of UTF16 surrogates. The test converts from
UTF-xx to INTERNAL, INTERNAL to UTF-xx and directly between
UTF-xx to UTF-yy. The latter conversion is needed because s390 has
iconv-modules, which converts from/to UTF in one step.
The new testcase was tested on a s390, power and intel machine.
ChangeLog:
[BZ #19727]
* iconvdata/utf-16.c (BODY): Report an error if first word is
not a valid high surrogate.
* iconvdata/utf-32.c (BODY): Report an error if the value is
in range of an utf16 surrogate.
* iconv/gconv_simple.c (BODY): Likewise.
* iconv/tst-iconv7.c: New file.
* iconv/Makefile (tests): Add tst-iconv7.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fix-UTF-16-surrogate-handling.-BZ-19727.patch
Type: text/x-patch
Size: 12996 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160225/5f2ee514/attachment.bin>
More information about the Libc-alpha
mailing list