[Gnucash-changes] Fixing UTF-8 support in X sessions
Christian Stimming
stimming at tuhh.de
Mon Oct 17 04:58:09 EDT 2005
Oops, Neil,
sorry for that -- my first complaint obviously was wrong. Turns out I
didn't read the generate-gnc-script in full so that I didn't realize the
commands are part of the here-document. So the "dependence on LANG at
compile time" doesn't exist, and that is obviously a good thing.
Nevertheless my second issue still remains, and I still think that this
isn't the solution of the problem you're seeing.
Christian
Christian Stimming schrieb:
> Dear Neil,
>
> that change is totally b0rken. Please revert it.
>
> Firstly, your change means that the generated script depends on the LANG
> setting at compile-time. This is fundamentally wrong. We cannot assume
> any relation whatsoever between the LANG at compile time and LANG at run
> time. So even if your additional sed-command would be a correct fix of
> the original problem (which I don't think it is), you definitely have to
> use this independently of the LANG at compile time. (Think compilation
> done by root in LANG=C but startup of gnucash by user xy in
> LANG=it_IT.utf-8 and user yz in LANG=de_DE.ISO-8859-1)
>
> Secondly, I'm not convinced the standard gnucash shell script should
> really modify LANG at all. From what I recall of your discussion,
> somehow your system didn't correctly switch to utf-8 unless you
> explicitly set LANG to a bla_BLA.UTF-8 locale. However, from what I
> recall this really only concerned *your* systen. I therefore strongly
> doubt that the correct fix is to modify LANG by default for all users.
> Instead, I rather think that LANG shouldn't be modified by us at all.
> LANG is as much a user-defined runtime setting as it could get. We
> really shouldn't touch it at all.
>
> I would rather suspect that some of the locales in your local (no pun
> intended) machine are broken for whatever reason. Or your particular
> libgnomeui might have some problem. Anyway, there are enough reports
> that the default LANG setting, be it with or without UTF-8, works
> absolutely correctly with the gnucash-gnome2-dev CVS (e.g. on suse9.3).
> So I think this is rather a problem of any of your library versions or
> of your installed locales.
>
> As your personal workaround I'd suggest that you keep modifying *your*
> generated gnucash script and come back on this issue when we have the
> first 1.9.0alpha out. But please revert this borken change for now.
>
> Christian
>
>
>
> diff -Lsrc/bin/generate-gnc-script -Lsrc/bin/generate-gnc-script -u
> -r1.2 -r1.2.4.1
> --- src/bin/generate-gnc-script
> +++ src/bin/generate-gnc-script
> @@ -15,6 +15,10 @@
> GUILE_WARN_DEPRECATED="no"
> export GUILE_WARN_DEPRECATED
>
> +(echo \$LANG | grep -v UTF-8 > /dev/null ) && \
> + LANG=\`echo \$LANG | sed s/$LANG/$LANG\.UTF-8/\` && \
> +echo UTF-8 support is required. Setting LANG to \$LANG
> +
> exec "${TARGET_SCRIPT}" "\$@"
> EOF
>
More information about the gnucash-devel
mailing list