I committed one of the cardinal sins of programming, it seems. The file truncation bug was due to an implicit assumption on my part that the number of characters in an XML stream was equal to the number of characters in the character array. For Unicode characters, of course this is not true, and so the xml stream was getting truncated. I don’t even remember thinking about it when I added the call to the KZip api. Alas.
I had some help from Michal Rudolf in tracking down the problem, and I appreciate that. It was exacerbated by the fact that there is no error recovery in XML and Qt’s DOM reader properly returns a NULL document when an error is encountered.
Bookcase 0.8.2 fixes the bug.
And as punishment, I promise to read The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) 20 times.
A couple of users have emailed me about truncated Bookcase data files. I’ve not run into that problem myself, but I’m going to check through the zip code again. I’d hate to have a bug of this magnitude, but just a reminder, it’s probably a good idea to back up your data file repeatedly, since I’m only a hobbyist programmer.
Bookcase 0.8.1 is available. New features include specialized entry templates for music and video collections, EAN to ISBN conversion, a versioned DTD, support for xmlcatalog in the configure script, and a Finnish translation. The French translation was updated, and the compilation and linking problems were fixed.
JPL publishes an newsletter called the Universe every two weeks and distributes it to employees. They make it available online, as well. The Jan 30 issue from Friday has articles about Opportunity’s landing, Vice President Cheney’s visit, and most enjoyable for me, some photos from Opportunity’s landing last Saturday night. Governor Arnold Schwarzenegger (I spelled that without looking, by the way) and Ex-Vice President Al Gore are in two of them.
I was out of blogland for the weekend. Susan has a great series on Opportunity’s egress. She and Asa both catch the first mention I’ve seen of Opportunity getting her own wake-up songs. Sol 7 began with Born to Run from Bruce Springsteen.
Spirit has recovered from her memory problems and will probably begin her science work again today.
And finally, more Mars humor, via Spacecraft:
The new operation, code-named “Opportunity,” was designed to divide the Martian resistance by space-dropping a mechanized unit some 6,600 miles away from the original beachhead at Gusev Crater. According to US officials, the second landing has encountered “minimal resistance.”
The initial operation, codenamed “Spirit,” had become bogged down Wednesday when the invasion force lost contact with the US command center in Pasadena, California – sparking comparisons to Vietnam and criticism that the invasion had become a “quagmire.”