Testing locale change from gnucash 1.8 to gnucash-g2

Didier Vidal didier-devel at 9online.fr
Sat Sep 24 16:43:26 EDT 2005



Le sam 24/09/2005 à 21:30, Derek Atkins a écrit :
> Quoting Neil Williams <linux at codehelp.co.uk>:
> 
> > Not hard - the GnuCash file backend doesn't use libxml2 for this part of the
> > file so it's a one line change in write_v2_header func in
> > src/backend/file/io-gncxml-v2.c. I'll put it into my next commit:
> > -    fprintf(out, "<?xml version=\"1.0\"?>\n");
> > +    fprintf(out, "<?xml version=\"1.0\" encoding="UTF-8"?>\n");
> >
> > I need to do it in QSF too where it will be done via libxml2.
> 
> Shouldn't this only be done IFF the datafile is actually in UTF-8?  I mean, if
> the datafile is still iso-8859-1 wont this cause problems?

Actually, after sending my first email, I tested how gnucash-g2 saves a
file that contains non ASCII letters (ie: é) with LANG=fr_FR.UTF-8.
I was surprised to see that it looks like the XML file is in ISO-8859-1
('é' is coded &#xE9;, while utf-8 code would be c3A9 from what I observe
in emacs in hexl-mode). Now, I'm lost. Looks like ISO-8859-1 is
hardcoded somewhere in gnucash data...

Didier. 



> 
> -derek



More information about the gnucash-devel mailing list