1
0
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:
Nick Wellnhofer 2024-06-07 00:01:16 +02:00
parent 0cde1b78d6
commit afe8f84514

View File

@ -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) {