Problems with accounts in gnucash/accounts

Didier Vidal didier-devel at 9online.fr
Thu Oct 20 17:27:14 EDT 2005


Le jeu 20/10/2005 à 23:15, Neil Williams a écrit :
> On Thursday 20 October 2005 9:52 pm, Didier Vidal wrote:
> > The accounts used by the gnucash druid are broken in many locales,
> > including fr_FR, fr_FR.UTF-8, de_DE.UTF-8, de_DE...
> >
> > The problem is that gnucash expects them to be in UTF-8.
> 
> AFAICT, gnucash still makes no assumptions about the encoding or expects any 
> particular encoding in the file.
Lets say that the GNOME GUI expects to receive utf-8 data then.
> 
> > On locale with ISO-8859-1 charset, if you run the following script, the
> > druid works again:
> > for i in *-xea
> > do
> > mv $i $i.iso
> > cat $i.iso | iconv  -f ISO-8859-1 -t UTF-8 > $i
> > done
> 
> What about converting to fr_FR or de_DE ?
> (and putting that in the encoding as fr-fr and de-de respectively).
I run the script on the fr_FR directory. I'm not sure to understand your
question.

> 
> > However, I'm not sure it's a good idea, since the files will not respect
> > the locale indicated by their directories.
> 
> Have you tried converting each directory to the intended locale instead of 
> UTF-8?
No. I'm not sure it's a good idea... There is no waranty that each
locale has its utf8 counterpart.

> 
> > The problem lies more in the way these files are read. It's probably not
> > by libxml2. Otherwise:
> >   libxml2 would certainly have handled the conversion correctly
> 
> Maybe not if the XML doesn't state the encoding itself. libxml2 does handle 
> XML content as UTF-8 internally (which is why we made the assumption above).
> 
> >   I also tried to specify the codeset in the XML header, but that didnt
> > fix the problem.
> 
> Note that XML doesn't have the same syntax for encoding specifiers - the 
> underscore is generally a hyphen and case is not important.
I'll check this.
> 
> Which codeset? How are you testing the files?
> 
> Did you set the XML encoding attribute to the codeset for the locale directory 
> of that file?
To the file header (<? xml version="1.0" encoding="ISO-8859-1" ?>
I'll double check I didn't make a mistake in this test and email back to
the list.

Didier.



More information about the gnucash-devel mailing list