Testing locale change from gnucash 1.8 to gnucash-g2

Didier Vidal didier-devel at 9online.fr
Sun Sep 25 04:59:59 EDT 2005


So, here is what I understand of the situation with encoding:

   * internally, gnucash-g2 data are in utf-8, whatever the locale used
to launch gnucash. What lead me to believe this is a trace I added in
xaccAccountSetName, in src/engine/Account.c 
--------
void 
xaccAccountSetName (Account *acc, const char *str) 
{
   char * tmp;


   printf("xaccAccountSetName: %s\n", str);
--------

   * the encoding conversion when reading a file seems to be handled
correctly by libxml2, even if the file doesn't respect the XML spec and
doesn't specify its encoding.

   * gnucash-g2 seems to write the xml files in ISO-8859-1, whatever the
locale used to launch gnucash (at least on my machine). I don't yet
understand why.  

   * The code pointed by Neil 
(fprintf(out, "<?xml version=\"1.0\"?>\n"); in io-gncxml-v2.c) 
is not called when you save a gnucash file. Anyway, it seems dangerous
to me to write an encoding specification in this part if we don't know
the actual encoding that will be used to write the rest of the file. I
agree with David that utf-8 is a good target.

Didier.



More information about the gnucash-devel mailing list