Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0006060Dwarf FortressLegends Mode -- History Exportpublic2012-06-27 22:082015-12-27 15:10
Toady One 
0006060: History XML file is cp437 encoded, but says it's utf-8 encoded
I'm working on a program to interpret the XML, and ran into problems; Perl's XML::Simple library tripped on bytes 0xAE and 0xAF. Looking at the file, the context called for item quality labels - the '<<' and '>>' glyphs are what were expected, and the cp437 equivilants to those two bytes; this proves the encoding is cp437. But the main problem is line 1:

<?xml version="1.0" encoding='UTF-8'?>

The file is _NOT_ utf8, it is cp437.
Probable Quick Fix
Issue History
2012-06-27 22:08TruePikachuNew Issue
2015-12-19 12:40SirPenguinNote Added: 0034054
2015-12-27 08:54lethosorAssigned To => lethosor
2015-12-27 08:54lethosorStatusnew => confirmed
2015-12-27 08:54lethosorTag Attached: Probable Quick Fix
2015-12-27 08:57lethosorNote Added: 0034216
2015-12-27 15:10Toady OneStatusconfirmed => resolved
2015-12-27 15:10Toady OneFixed in Version => Next Version
2015-12-27 15:10Toady OneResolutionopen => fixed
2015-12-27 15:10Toady OneAssigned Tolethosor => Toady One

2015-12-19 12:40   
Would suggest tagging this as Probable Quick Fix. It's should be as simple as changing the XML writer from encoding="UTF-8" to encoding="CP437". no other steps needed

Not a huge deal but annoying enough
2015-12-27 08:57   
(Another solution would be to convert those characters to UTF-8; I'm not sure if DF is able to do that already, though, but some stuff from https://github.com/DFHack/dfhack/blob/master/library/MiscUtils.cpp [^] might work if that's desirable.)