Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-25 Thread Didier Vidal
Le dim 25/09/2005 à 11:55, Neil Williams a écrit : [...] > >* The code pointed by Neil > > (fprintf(out, "\n"); in io-gncxml-v2.c) > > is not called when you save a gnucash file. > > ??? Umm, it is: You are right, Neil. It is called. I did an error in my test. Now, I know where to search from,

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-25 Thread Didier Vidal
Le dim 25/09/2005 à 11:55, Neil Williams a écrit : > On Sunday 25 September 2005 9:59 am, Didier Vidal wrote: > > 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. > > True. > > > Wh

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-25 Thread Didier Vidal
> > > 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 actual source

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-25 Thread Neil Williams
On Sunday 25 September 2005 9:59 am, Didier Vidal wrote: > 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. True. > What lead me to believe this is a trace I added in > xaccAccountSetNam

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-25 Thread Didier Vidal
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,

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-24 Thread Derek Atkins
qofquery-serialize is only used by QOF/QSF. This isn't how gnucash-xmlv2 is used. -derek Quoting Didier Vidal <[EMAIL PROTECTED]>: The solution is probably in qofquery-serialize.c... Looks like qof is used by the file backend (sorry, I'm still totally newbie about gnucash modules). Didier.

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-24 Thread Didier Vidal
The solution is probably in qofquery-serialize.c... Looks like qof is used by the file backend (sorry, I'm still totally newbie about gnucash modules). Didier. find . -type f -name '*.c' -exec grep 8859 {} \; -print xmlNodeDumpOutput (xbuf, NULL, topnode, 99, 99, "iso-8859-1"); ./engine

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-24 Thread David Hampton
On Sat, 2005-09-24 at 15:30 -0400, Derek Atkins wrote: > Quoting Neil Williams <[EMAIL PROTECTED]>: > > > 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

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-24 Thread Didier Vidal
Attached is a file I created with gnucash-g2 from today's cvs, with LANG=fr_FR.UTF-8. The "é" is saved as é (ISO-8859-1) It's a file I created from scratch. So it's not about an encoding that would be kept from an imported file by any obscure way. [EMAIL PROTECTED] bin]$ echo $LANG fr_FR.UTF-8 [

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-24 Thread Didier Vidal
Le sam 24/09/2005 à 21:30, Derek Atkins a écrit : > Quoting Neil Williams <[EMAIL PROTECTED]>: > > > 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

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-24 Thread Neil Williams
On Saturday 24 September 2005 5:21 pm, Didier Vidal wrote: > GnuCash has a problem with encoding: GnuCash ignores encoding. (Not quite the same issue!) > it doesn't write the encoding > system in the XML files it saves. > (if encoding is not utf-8 or utf-16, it must be specified: > http://www.w3

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-24 Thread Neil Williams
On Saturday 24 September 2005 8:30 pm, Derek Atkins wrote: > Quoting Neil Williams <[EMAIL PROTECTED]>: > > 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 int

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-24 Thread Derek Atkins
Quoting Neil Williams <[EMAIL PROTECTED]>: 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, "\n"); +fprintf(out, "\n"); I

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-24 Thread Neil Williams
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. >

Re: Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-24 Thread David Hampton
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 o

Testing locale change from gnucash 1.8 to gnucash-g2

2005-09-24 Thread Didier Vidal
Hello, GnuCash has a problem with encoding: it doesn't write the encoding system in the XML files it saves. (if encoding is not utf-8 or utf-16, it must be specified: http://www.w3.org/TR/REC-xml/#charencoding) The potential problems are: - If someone switches to a new linux distrib (that use