mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-09 04:58:16 +03:00
runtest: Work around broken EUC-JP support in musl iconv
Should fix #728.
This commit is contained in:
parent
0cde1b78d6
commit
afe8f84514
18
runtest.c
18
runtest.c
@ -4938,7 +4938,25 @@ launchTests(testDescPtr tst) {
|
||||
|
||||
ebcdicHandler = xmlGetCharEncodingHandler(XML_CHAR_ENCODING_EBCDIC);
|
||||
ibm1141Handler = xmlFindCharEncodingHandler("IBM-1141");
|
||||
|
||||
/*
|
||||
* When decoding EUC-JP, musl doesn't seem to support 0x8F control
|
||||
* codes.
|
||||
*/
|
||||
eucJpHandler = xmlGetCharEncodingHandler(XML_CHAR_ENCODING_EUC_JP);
|
||||
if (eucJpHandler != NULL) {
|
||||
xmlBufferPtr in, out;
|
||||
|
||||
in = xmlBufferCreateSize(10);
|
||||
xmlBufferCCat(in, "\x8f\xe9\xae");
|
||||
out = xmlBufferCreateSize(10);
|
||||
if (xmlCharEncInFunc(eucJpHandler, out, in) != 3) {
|
||||
xmlCharEncCloseFunc(eucJpHandler);
|
||||
eucJpHandler = NULL;
|
||||
}
|
||||
xmlBufferFree(out);
|
||||
xmlBufferFree(in);
|
||||
}
|
||||
|
||||
if (tst == NULL) return(-1);
|
||||
if (tst->in != NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user