invalid glib key names in gnucash
hampton-gnucash at rainbolthampton.net
Fri Dec 29 23:06:28 EST 2006
On Fri, 2006-12-29 at 10:42 -0800, Thomas Bushnell BSG wrote:
> gnucash creates its own glib key files in ~/.gnucash/books. The keys
> used in these files are filled with spaces. Spaces are not allowed in
> glib keys.
Since when? The g_keyfile documentation that appears in devhelp says
nothing about the space character being invalid in keys. In fact, it
implicitly implies that the space *is* a valid character, by
specifically stating that "to preserve initial and final spaces, these
can also be escaped as \s." This documentation is generated directly
from the glib sources.
> As of glib version 2.12.5, key names are being validated and errors
> returned if invalid keys are used.
That's just rude. At minimum there should be a transition period where
an error is spit out for these so-called invalid keys.
> This causes the stored data in ~/.gnucash/books to be ignored and
> also unsaved.
> Upstream is opposed to changing glib to allow spaces, because in part
> the syntax is unclear (what about leading spaces? what about spaces
> around the equal sign?).
Eh? This is clearly spelled out in the documentation produced from the
current glib g_keyfile sources.
1) Space before and after the '=' character are ignored.
2) To preserve initial and final spaces, these can also
be escaped as \s.
> Two things are necessary here:
> 1) Make gnucash stop using the illegal keys,
They weren't illegal when the code was written. They still aren't if
you have glib less then 2.12.5. The glib developers have made them
illegal by fiat.
> 2) Transition for users with existing files so that they don't suddenly
Duh. Try telling that to the glib developers.
Sincerely pissed off,
More information about the gnucash-devel