aboutsummaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2013-03-15 19:02:14 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-15 16:29:37 -0700
commit757791335f212a189790452cb2d467c31a2ae672 (patch)
tree1a30448a7f69efd479c711f1999333f2502ee767 /divelist.c
parent98d769a02fc4f42c5afb20153847ab358ecc126f (diff)
downloadsubsurface-757791335f212a189790452cb2d467c31a2ae672.tar.gz
Support divelogs.de exports that include Cyrillic characters
divelogs.de sends us XML files that explicitly state that they are in ISO-8859-1 encoding (which is true). These files contain the HTML encoded Cyrillic characters. Once we decode those characters the resulting file is actually UTF-8 encoded (which is a superset of ISO-8859-1). That seriously confuses libxml when it tries to parse things. So instead recognize divelogs.de files and skip the encoding declaration for them before decoding the HTML encoded non-ISO-8859-1 characters. This does show, however, that divelogs.de incorrectly truncates the encoded strings (at least in some sample data that I created the parsing throws errors because of that). Reported-by: Sergey Starosek <sergey.starosek@gmail.com> Based-on-code-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
0 files changed, 0 insertions, 0 deletions