Problems with accounts in gnucash/accounts

Neil Williams linux at codehelp.co.uk
Thu Oct 20 17:51:31 EDT 2005


On Thursday 20 October 2005 10:27 pm, Didier Vidal wrote:
> Lets say that the GNOME GUI expects to receive utf-8 data then.

It should too, because libxml2 only works in UTF-8 internally. As gnucash 
doesn't change the encoding itself, libxml2 outputs UTF-8 which is passed to 
the GUI - as long as libxml2 is told the correct encoding in the first place.

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

libxml2 will deal with that, what matters is that libxml2 is told the correct 
encoding for the incoming file. It will assume UTF-8 if there is no encoding 
attribute in the XML header. Then you WILL get problems if no UTF-8 
counterpart exists.

As long as the encoding attribute matches the iconv converted encoding, 
libxml2 should sort it all out for us. If either of those is wrong, we get 
problems.

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

Ooops. I'm thinking of <xml:lang> not <?xml ... encoding=""?>. Ignore that.

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

That would only work if the content of that file was ISO-8859-1 - but if that 
is done, it should "just work".

-- 

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/a5ba3520/attachment.bin


More information about the gnucash-devel mailing list