mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Attempt latin1 parsing on import
We parse input XML using UTF-8 encoding by default. If this fails, try latin1 instead. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
c88be99d84
commit
58a25d33ce
1 changed files with 3 additions and 0 deletions
|
@ -2042,6 +2042,9 @@ int parse_xml_buffer(const char *url, const char *buffer, int size,
|
|||
|
||||
target_table = table;
|
||||
doc = xmlReadMemory(res, strlen(res), url, NULL, 0);
|
||||
if (!doc)
|
||||
doc = xmlReadMemory(res, strlen(res), url, "latin1", 0);
|
||||
|
||||
if (res != buffer)
|
||||
free((char *)res);
|
||||
|
||||
|
|
Loading…
Reference in a new issue