mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-23 01:52:48 +03:00
encoding: Restore old lookup order in xmlOpenCharEncodingHandler
When looking up encodings with xmlLookupCharEncodingHandler, the
returned handler can have a different name than requested
(capitalization, internal aliases). This should eventually be fixed.
For now we revert part of commit 5b893fa9
, start the lookup with
xmlFindHandler and add an explicit check for UTF-8.
Should fix the encoding name issue mentioned in #749.
This commit is contained in:
@@ -50,7 +50,8 @@ testUnsupportedEncoding(void) {
|
||||
xmlFreeDoc(doc);
|
||||
|
||||
error = xmlGetLastError();
|
||||
if (error->code != XML_ERR_UNSUPPORTED_ENCODING ||
|
||||
if (error == NULL ||
|
||||
error->code != XML_ERR_UNSUPPORTED_ENCODING ||
|
||||
error->level != XML_ERR_WARNING ||
|
||||
strcmp(error->message, "Unsupported encoding: #unsupported\n") != 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user