Fix fr_FR accounts

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Fix fr_FR accounts

Didier Vidal
You must specify the file's codeset, or libxml2 will fail to read the
accounts.

To know the codeset of a locale:
LANG=<dirName> locale charmap

Then, you can apply [sorry for the linewrap / I have to learn how to
configure my mailer agent.... (evolution)] - replace ISO-8859-1 by the
appropriate charmap

for i in *-xea
do mv $i $i.iso
cat $i.iso | sed  's/<?xml version="1.0"?>/<?xml version="1.0"
encoding="ISO-8859-1"?>/' > $i
done

then
make install

test the druid:

LANG=<dirName> ./gnucash

I recommend to apply the fix to all accounts directories

_______________________________________________
gnucash-patches mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-patches

accounts.fr_FR.patch (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fix fr_FR accounts

David Hampton-2
On Thu, 2005-10-20 at 23:41 +0200, Didier Vidal wrote:

> You must specify the file's codeset, or libxml2 will fail to read the
> accounts.
>
> To know the codeset of a locale:
> LANG=<dirName> locale charmap
>
> Then, you can apply [sorry for the linewrap / I have to learn how to
> configure my mailer agent.... (evolution)] - replace ISO-8859-1 by the
> appropriate charmap
>
> for i in *-xea
> do mv $i $i.iso
> cat $i.iso | sed  's/<?xml version="1.0"?>/<?xml version="1.0"
> encoding="ISO-8859-1"?>/' > $i
> done
>
> then
> make install
>
> test the druid:
>
> LANG=<dirName> ./gnucash
>
> I recommend to apply the fix to all accounts directories

I believe this is the wrong approach.  In g2 we should be shipping utf-8
encoded versions of these account trees, not older iso-8859-x encodings
that require converting upon each use.

David


_______________________________________________
gnucash-patches mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-patches
Reply | Threaded
Open this post in threaded view
|

Re: Fix fr_FR accounts

Christian Stimming
Didier,

thanks for pointing out the missing encoding in the account templates.

David Hampton schrieb:
>>You must specify the file's codeset, or libxml2 will fail to read the
>>accounts.
>> (...)
>>cat $i.iso | sed  's/<?xml version="1.0"?>/<?xml version="1.0"
>>encoding="ISO-8859-1"?>/' > $i
>> (...)
>>
>>I recommend to apply the fix to all accounts directories

Yes. Will do that next week, although I'm not too sure whether some
account templates are more recent in the 1-8-branch. But I'll take care
of this during next week.

> I believe this is the wrong approach.  In g2 we should be shipping utf-8
> encoded versions of these account trees, not older iso-8859-x encodings
> that require converting upon each use.

No, I believe this is a correct approach. The wrong part here was that
we didn't specify the encoding of the file at all. This should be
changed. And once the encoding is specified, it is pretty much up to our
discretion which encoding this actually is: utf-8, iso-8859-1, whatever.
This is actually also a problem with all gnucash XML files -- as long as
we don't write
<?xml version="1.0" encoding="whatever-encoding"?> in the header, we
will be in trouble sooner or later. At every XML files that there is, we
should get used to the habit of writing the actual encoding in the
heading tag.

Christian

_______________________________________________
gnucash-patches mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-patches
Reply | Threaded
Open this post in threaded view
|

Re: Fix fr_FR accounts

Didier Vidal
In reply to this post by David Hampton-2
[...]
>
> I believe this is the wrong approach.  In g2 we should be shipping utf-8
> encoded versions of these account trees, not older iso-8859-x encodings
> that require converting upon each use.
>
> David

I don't understand your concern, David.
Converting will not have to be done by Gnucash developers. It's handled
by libxml2. You cane safely assume that all strings inside gnucash are
utf8.
Shipping an XML file with an arbitrary encoding is perfectly OK as long
as the encoding is specified in the header.

Some could fine more aesthetic to ship only utf8 XML and translation
files. I don't understand the rationale. Shipping arbitrary encodings
proves and tests that gnucash is a good citizen in the internationalized
applications world and supports any locale. It will require a number of
years more before all the systems and files have transitioned to utf8,
and that the encoding mess can be forgotten.

libxml contains also a number of converters, and is even not dependent
on the glibc install for most frequent encoding systems.

Didier.
>
>

_______________________________________________
gnucash-patches mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-patches
Reply | Threaded
Open this post in threaded view
|

Re: Fix fr_FR accounts

David Hampton-2
On Fri, 2005-10-21 at 21:12 +0200, Didier Vidal wrote:
> [...]
> >
> > I believe this is the wrong approach.  In g2 we should be shipping utf-8
> > encoded versions of these account trees, not older iso-8859-x encodings
> > that require converting upon each use.
> >
> > David
>
> I don't understand your concern, David.

It seems very odd to me that after all the work of converting to gtk2
(libxml2, etc.) to produce an application that supports utf-8 cleanly,
that we would ship an old set of data files based on ISO-8859 encodings.
It feels unfinished.

David


_______________________________________________
gnucash-patches mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-patches