Bug? Problem with Gnucash Transcation Editor

Christophe Guychard Christophe.Guychard@enst-bretagne.fr
Mon, 11 Dec 2000 14:18:01 +0100


> > There is the same pb with 1.5.x and CVS snapshots, + some trouble
> > with i18n in XML generation code. I already told the list about
> > that but did not get any feed-back...(guid-to-string,
> accentuated chars).
>
> I remember one post from you about an XML error, but I didn't think
> that said anything about accentuated chars. Could you explain the
> error?

Sure.

But I'm at work atm and so, I do not have the sample files that help reproduce
the error. I could send them to you tomorrow.

In fact, I have a quite huge (2 years) Gnucash file from 1.4.x branch. It
contains
Account name and transcation mémos with accentuated chars (locale encoding:
iso-8859-1).

When I use 1.5.x or CVS's to translate the file into the new XML format gnucash
happens to
act like that:

1) open old file format (currency dialog,...), all seems ok in the register
2) save my file to XML, with a new name... One single message, in the term
window
   (xml<something>: string is not utf-8, or something like that...)
   but all is going okay... Except that when you 'cat' the file, accents have
been replaced
   by sequences of non-accentuated one. This could seem normal as libxml saves
data in utf-8 by
   default...but the sequence are bad!
3) quit Gnucash, run once again, open newly XML-translated file, the accuented
chars look bad!

I suppose that the Pb could be resolve by explicitly setting the saving encoding
of libxml
as, if you edit the file by hand, replaces the accentuated word correctly and
replace
xml header by <?xml version="1.0" encoding="iso-8859-1" ?> the file loads with
the right
accentuated strings.

but I had no time to test this :((

from libxml doc:
[ int         xmlSaveFileEnc                  (const char *filename,
                                             xmlDocPtr cur,
                                             const char *encoding); ]

I had also another trouble with translation of account's guid. I've not yet look
after that
so I don't know wich one was offending...
But, as I said,  I can send you the file I used as soon as I will have located
where
the troubles come from (cause its my private accounting, so, I prefer not to
send it
before I filter it :o) ).

If I can help, I will, but (even if I've been using Gnucash for a while now) I'm
not
yet familiar with the code, so...

BTW, did Y. Le Ny started to translate the newer docs?
Maybe I could help to do that, it will help me to better understand
Gnucahs internals maybe?

XtoF.