Problems with accounts in gnucash/accounts

Neil Williams linux at codehelp.co.uk
Thu Oct 20 17:15:26 EDT 2005


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.

> 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).

> 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?

> 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.

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?

-- 

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/20051020/371f7ff1/attachment.bin


More information about the gnucash-devel mailing list