I’ve come across two more encoding bugs in Bookcase. This is tough stuff to get right. First, someone kindly sent me an email pointing out that the bookcase2bibtex.xsl stylesheet outputs in UTF-8 encoding. Evidently, this was unexpected, since the locale was still ISO-8859-1. I’m not sure if this is a bug, or just unexpected behavior. The encoding attribute of the xsl:output tag is only used for specifying the encoding of the output if the output is an XML document, near as I can tell.
Second, importing a Bibtexml file, which is in UTF-8 and has some “unusual” characters like German umlauts, results in the text being converted twice to ISO-8859-1 for some reason, which I can’t figure out. Both libxslt and Qt perform the recoding, resulting in wrong data. This one really has me puzzled…I can’t find anything in my code that would seem to cause it. The data file is read in by libxslt, run through the stylesheet, and then a QString is output. And I load that QString into my document. Hmmmm…
I’ve been working on the next version of Bookcase, which should be 0.6. I’ve made some pretty good progress – quick and advanced view filtering, multiple-book editing, keyboard accels, and, I think, customizable fields.
That last part is tricky. I have several different type of fields – simple text, list, checkbox, year, and I added paragraph and URL. I’m not quite sure what to do with the document file, though. If I write the XML in the file using the customizable titles, then that pretty much throws the DTD file out the window. I don’t really mind that, it was an after-thought in the first place. Or, I could write the data as something like
<custom title="My Field">My Value<custom>
but then the XSLT gets tricky, especially if things like i18n get in the way. Hmmm, what to do…
And I’m struggling with the kio_z3950r part of things. I can’t get the GUI right, and the error-handling isn’t working right. Since I’ve got so much else done, I may go ahead, again, and just release the next version without the online data retrieval. Dang it… I’m just ignorant when it comes to coding anyways…I look through the Bookcase source and feel ashamed at the stupid tricks I do to get things to work. Elegant it ain’t.
So anyways, Bookcase 0.6 should be out in a week or so…
Joseph Reagle wrote a blog entry about converting his haphazard reading list into XML using python, importing it into Bookcase, and then converted the file into a format suitable for his Palm. He also did some nifty magic with Amazon’s web services and Mark Pilgrim’s PyAmazon to query for additional information about his books. Very cool…
Our internal news board at work just had this item posted:
This is the first time JPL has ever had four spacecraft at Kennedy Space Center in Florida at the same time, getting ready for launches.
The JPL-managed Space Infrared Telescope Facility (SIRTF) is undergoing final preparations for launch at KSC aboard a Boeing Delta-II rocket. The second stage of the SIRTF expandable launch vehicle has been hoisted and installed atop the Delta-II first stage on a launch pad at the Cape Canaveral Air Force Station.
The Galaxy Evolution Explorer is also one step closer to launch. Workers are making adjustments on Galex while connecting the spacecraft with its Pegasus XL launch vehicle.
The two Mars Exploration Rovers are also at KSC, being prepared for launch.
I added the hyperlinks in the message. I’m not sure too many folks in the general public realize what a frenzy of design, build, and launch JPL has been going through lately.
I’ve been emailing with someone who succeeded in converting a Bookcase file into a Pilot-DB database file. He used the JPilot-DB XML importer. There is a bit of a problem with boolean fields, as evidently, the database sees an empty element as having an empty value, rather than a true boolean value. But if you run the Bookcase file through a short XSL transform to turn <read/> into <read>true</read>, I think it fixes that problem.
If I have the time to check through the JPilot-DB library, maybe I can eventually add that as an export option in Bookcase.
I just implemented a quick toolbar filter for Bookcase. It was rather quick and painless, and I was actually surprised at how fast the view filter is. I was also suprised at how useful I immediately found it.
It just filters all the items by a string, checking every field for each book. I plan to add an advanced filter dialog to allow multiple filter rules and regexps. But the nuts and bolts are there and this will be in version 0.6. This is rather fun! KDE makes it amazingly easy. I ended up copying a toolbar action for a combobox from Konqueror since I want to retain compatability with KDE 3.0.x. Otherwise, I would just use the new KWidgetAction object from KDE 3.1.
A friend of mine pointed out an article in The Atlantic called “Kicking the Secularist Habit” by David Brooks. It’s quite the interesting read, primarily about the demonstrably incorrect assumption that
as the world becomes richer and better educated, it becomes less religious.
One interesting statement, which might be targeted at the ongoing discussion of how best to organize the post-war Iraqi government, is
This country has built powerful institutions, such as the State Department and the CIA, that use them [social-science models] to try to develop sound policies. But none of the models can adequately account for religious ideas, impulses, and actions, because religious fervor can’t be quantified and standardized. Religious motivations can’t be explained by cost-benefit analysis.
Another interesting statement that Brooks makes is that
human beings yearn for righteous rule, for a just world or a world that reflects God’s will—in many cases at least as strongly as they yearn for money or success. I think that may apply to the majority of the world, but I’m uneasy about stating it as a blanket description. It’s a basically a desire for fairness, after all—that people get their “just desserts.”
Brooks’ last point is that
this country was never very secular anyway… We instinctively feel, in ways that people from other places do not, that history is unfulfilled as long as there are nations in which people are not free. I’d say that’s dead on-target, at least for most Americans that I know.
Altogether, the article is rather insightful.
I recently changed the Copyright Year field in Bookcase to allow for multiple values, say for short story anthologies, etc. But one of the other things I had added was a 4-digit validator for the text edit book entry widget. Needless to say, limiting the entry to 4 digits prevents having multiple years separated by the semi-colon. The backend allowed it, but the entry widget didn’t.
If you want to fix the problem, you can use this diff file, 0.5.2a-bcuniteditwidget.cpp.diff. WIthin the top-level bookcase-0.5.2a directory, run patch by the command:
patch -p0 < 0.5.2a-bcuniteditwidget.cpp.diff
and then recompile.
Or you can just wait for the next release.
I finally fixed the problem I had yesterday with autoconf and automake. I downgraded autoconf to the version from Mandrake 9.0, which is 2.53, and autoconf to 1.6.3. Now everything seems to work.
So, in summary, for Mandrake 9.1, I can compile KDE apps using automake1.6-1.6.3 and autoconf2.5-2.53.