Testing locale change from gnucash 1.8 to gnucash-g2
Neil Williams
linux at codehelp.co.uk
Sat Sep 24 15:15:43 EDT 2005
On Saturday 24 September 2005 5:49 pm, David Hampton wrote:
> On Sat, 2005-09-24 at 18:21 +0200, Didier Vidal wrote:
> > However, from my tests, gnucash still doesn't follow the XML standard:
> > - It will save your files in the locale's charset without writing the
> > encoding in the header.
>
> The G2 branch should be changed to write files in utf-8 regardless of
> locale. I've not looked at the libxml2 libraries so I don't know how
> hard this would be.
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.
> > It would be better to write the encoding in the XML file. I'll try to
> > see if I can find time to make a patch for it, but I can't promise
> > anything. So, if someone volunteers in the mailing list, let me know :-)
Consider it done.
--
Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20050924/c85d4ab9/attachment.bin
More information about the gnucash-devel
mailing list