Error Parsing the File
Geert Janssens
janssens-geert at telenet.be
Wed Apr 21 04:47:11 EDT 2010
On Wednesday 21 April 2010, Marcus Wolschon wrote:
> I would like to make sure that jGnucashLib can read such broken files
> and spit them out correctly.
> Can you provide more info on this issue?
Hi Marcus,
All the information I have is in the bugreport I referred to:
https://bugzilla.gnome.org/show_bug.cgi?id=611853
> What is the best way to deal with it? Set the missing dataPosted to
> the dateEntered and report the issue
> to the user?
>
For now, that's probably the best workaround.
> Why does Gnucash not validate it´s own XML-schema while writing but
> only when reading?
>
The bug happens because gnucash lets glib handle the date entered by the user
and trusts this always works. But apparently there are some cases (only on
Windows) where the date string passed to glib is not interpreted properly. I
still haven't been able to reproduce this, so I don't know the exact
circumstances this happens in. That makes it difficult to fix it properly.
A good temporary solution would probably be to at least check the result of
the glib function, and supply the dateEntered value if the datePosted value is
invalid, and issuing a warning. At least the user won't end up with an
unparseable data file.
Geert
More information about the gnucash-user
mailing list