Testing locale change from gnucash 1.8 to gnucash-g2

David Hampton hampton-gnucash at rainbolthampton.net
Sat Sep 24 16:55:21 EDT 2005

On Sat, 2005-09-24 at 15:30 -0400, Derek Atkins wrote:
> 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?

Everything in gtk2 is handled internally as utf8.  Unless gnucash
specifically converts the data when writing to disk, it should be
written out as utf8 as well.

The question for me was how does the g2 version handle the initial read
of a 1.8 data file with non-ascii characters.  It sounds like (from
Didier's first message) that libxml2 will convert these files to utf8
when they are read in.


More information about the gnucash-devel mailing list