Re: GTK applications behave weird if locale is set to anything other than "C"
Hi, @Yves I've never seen the Gtk-Warning below, though I am using "de_DE.UTF-8". My open file dialog of Gnucash also shows everything in alphabetical order. Something else must be wrong. @Rolf, as you are using an Intel-Mac and I am sitting on a PowerPC: What's in your /usr/share/locale/ ? That seems to be the place where GTK-apps get their localization stuff (I was able to fix Gnucash's missing EURO-Sign () by editing /usr/share/locale/de_DE.UTF-8/LC_MONETARY. ) . What happens if you type "locale" and "locale -a" in a terminal? @all If GTK-apps read their language specific settings from usr/share/locale, what is /opt/local/share/locale used for ???? Best Regards, Peter ----- Original Message ---- From: Yves de Champlain <yves@macports.org> To: Rolf Schäuble <mailinglists@rschaeuble.de> Cc: macports-users@lists.macosforge.org Sent: Thursday, 15 March, 2007 10:27:14 PM Subject: Re: GTK applications behave weird if locale is set to anything other than "C" [ ... ] Hi first of all, any gtk app will kindly tell you that : Gtk-WARNING **: Locale not supported by C library. Using the fallback C locale. And the only way of dealing with many problems is indeed to avoid localisation. But I do use LANG=fr and nothing else (no _CA, no LC_ALL) and many things do work quite fine, including gimp. yves _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users ___________________________________________________________ Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
Hi, I think we got an interesting fact here: On my PowerPC MacMini, it works, too, like on your PowerPC Mac. So the issue might be platform dependent. The output of locale is as expected, all variables set to de_DE.UTF-8. locale -a outputs the expected list of supported locales, which include de_DE.UTF-8. I had a look at /usr/share/locale, but I can't see anything wrong here. The LC_COLLATE file is binary, so I have no clue what it means. But I diffed it against the same file on my PowerPC MacMini, and they are identical. Can anyone else with a Intel Mac confirm this behaviour? Just execute export LANG=en_US export LC_ALL=en_US # start any GTK application, open a file chooser dialog, and check if the sorting is correct (maybe try it with different directories). Any ideas on how to proceed? Thanks Rolf Am 15.03.2007 um 23:52 schrieb petr.snyder@yahoo.co.uk:
Hi,
@Yves I've never seen the Gtk-Warning below, though I am using "de_DE.UTF-8". My open file dialog of Gnucash also shows everything in alphabetical order. Something else must be wrong.
@Rolf, as you are using an Intel-Mac and I am sitting on a PowerPC: What's in your /usr/share/locale/ ? That seems to be the place where GTK-apps get their localization stuff (I was able to fix Gnucash's missing EURO-Sign (€) by editing /usr/share/locale/ de_DE.UTF-8/LC_MONETARY. ) . What happens if you type "locale" and "locale -a" in a terminal?
@all If GTK-apps read their language specific settings from usr/ share/locale, what is /opt/local/share/locale used for ????
Best Regards, Peter
----- Original Message ---- From: Yves de Champlain <yves@macports.org> To: Rolf Schäuble <mailinglists@rschaeuble.de> Cc: macports-users@lists.macosforge.org Sent: Thursday, 15 March, 2007 10:27:14 PM Subject: Re: GTK applications behave weird if locale is set to anything other than "C"
[ ... ]
Hi
first of all, any gtk app will kindly tell you that :
Gtk-WARNING **: Locale not supported by C library. Using the fallback C locale.
And the only way of dealing with many problems is indeed to avoid localisation.
But I do use LANG=fr and nothing else (no _CA, no LC_ALL) and many things do work quite fine, including gimp.
yves
_______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
___________________________________________________________ Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/ nowyoucan.html _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Le 07-03-15 à 18:52, petr.snyder@yahoo.co.uk a écrit :
Hi,
@Yves I've never seen the Gtk-Warning below, though I am using "de_DE.UTF-8". My open file dialog of Gnucash also shows everything in alphabetical order. Something else must be wrong.
You will see it when launching an app from an xterm
@Rolf, as you are using an Intel-Mac and I am sitting on a PowerPC: What's in your /usr/share/locale/ ? That seems to be the place where GTK-apps get their localization stuff (I was able to fix Gnucash's missing EURO-Sign (€) by editing /usr/share/locale/ de_DE.UTF-8/LC_MONETARY. ) . What happens if you type "locale" and "locale -a" in a terminal?
I'm on PPC too.
@all If GTK-apps read their language specific settings from usr/ share/locale, what is /opt/local/share/locale used for ????
the locale tool is not provided by macports. But MacPorts apps will fetch their localized text in /opt/local/share/locale yves
----- Original Message ---- From: Yves de Champlain <yves@macports.org> To: Rolf Schäuble <mailinglists@rschaeuble.de> Cc: macports-users@lists.macosforge.org Sent: Thursday, 15 March, 2007 10:27:14 PM Subject: Re: GTK applications behave weird if locale is set to anything other than "C"
[ ... ]
Hi
first of all, any gtk app will kindly tell you that :
Gtk-WARNING **: Locale not supported by C library. Using the fallback C locale.
And the only way of dealing with many problems is indeed to avoid localisation.
But I do use LANG=fr and nothing else (no _CA, no LC_ALL) and many things do work quite fine, including gimp.
yves
Well, I think I got the culprit: strxfrm(). Here's a small app that reproduces the problem for me: int main(int argc, char** argv) { char buf[512]; int res = 0; if (argc > 1) setlocale(LC_ALL, ""); res = strxfrm(buf, "test", sizeof(buf)); printf("%d, %s\n", res, buf); return 0; } When I execute it with LC_ALL=C, the output is "4, test" When I execute it with LC_ALL=en_US or LC_ALL=de_DE.UTF-8, I get "4, ". Now I just have to find out why strxfrm() doesn't work (and I guess this will be the hard part ;-) ). Best regards Rolf Am 16.03.2007 um 14:56 schrieb Rolf Schäuble:
Hi,
I think we got an interesting fact here: On my PowerPC MacMini, it works, too, like on your PowerPC Mac. So the issue might be platform dependent.
The output of locale is as expected, all variables set to de_DE.UTF-8. locale -a outputs the expected list of supported locales, which include de_DE.UTF-8.
I had a look at /usr/share/locale, but I can't see anything wrong here. The LC_COLLATE file is binary, so I have no clue what it means. But I diffed it against the same file on my PowerPC MacMini, and they are identical.
Can anyone else with a Intel Mac confirm this behaviour? Just execute export LANG=en_US export LC_ALL=en_US # start any GTK application, open a file chooser dialog, and check if the sorting is correct (maybe try it with different directories).
Any ideas on how to proceed?
Thanks Rolf
Am 15.03.2007 um 23:52 schrieb petr.snyder@yahoo.co.uk:
Hi,
@Yves I've never seen the Gtk-Warning below, though I am using "de_DE.UTF-8". My open file dialog of Gnucash also shows everything in alphabetical order. Something else must be wrong.
@Rolf, as you are using an Intel-Mac and I am sitting on a PowerPC: What's in your /usr/share/locale/ ? That seems to be the place where GTK-apps get their localization stuff (I was able to fix Gnucash's missing EURO-Sign (€) by editing /usr/share/locale/ de_DE.UTF-8/LC_MONETARY. ) . What happens if you type "locale" and "locale -a" in a terminal?
@all If GTK-apps read their language specific settings from usr/ share/locale, what is /opt/local/share/locale used for ????
Best Regards, Peter
----- Original Message ---- From: Yves de Champlain <yves@macports.org> To: Rolf Schäuble <mailinglists@rschaeuble.de> Cc: macports-users@lists.macosforge.org Sent: Thursday, 15 March, 2007 10:27:14 PM Subject: Re: GTK applications behave weird if locale is set to anything other than "C"
[ ... ]
Hi
first of all, any gtk app will kindly tell you that :
Gtk-WARNING **: Locale not supported by C library. Using the fallback C locale.
And the only way of dealing with many problems is indeed to avoid localisation.
But I do use LANG=fr and nothing else (no _CA, no LC_ALL) and many things do work quite fine, including gimp.
yves
_______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
___________________________________________________________ Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/ nowyoucan.html _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
_______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Hi all, --- Yves de Champlain <yves@macports.org> wrote:
You will see it when launching an app from an xterm
I know. But running gnucash from a terminal doesn't produce any GTK-locale-errors, my alphabetical order is all right and everything is displayed in the desired language. So GTK2 seems to support other locales than "C". What am I doing wrong?
the locale tool is not provided by macports. But MacPorts apps will fetch their localized text in /opt/local/share/locale
Hmmh, that's definitely not true for LC_MONETARY and Gnucash. Gnucash obviously fetches its currency-symbols from /usr/share/locale. So I suspect that other GTK-apps get their locales from /usr/share/locale, too. I am a bit confused, because MacPorts is said to be somehow self-reliant, e.g. libraries or apps that might be available from MacOS X' itself (e.g. perl), are normally ignored and rebuilt and installed in /opt/local/... ; It took me ages to figure out that the missing € (EURO) is to be fixed by editing a file in a MacOS X standard directory. Best Regards, Peter ___________________________________________________________ New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk
Le 07-03-16 à 16:22, Peter Schneider a écrit :
Hi all,
--- Yves de Champlain <yves@macports.org> wrote:
You will see it when launching an app from an xterm
I know. But running gnucash from a terminal doesn't produce any GTK-locale-errors, my alphabetical order is all right and everything is displayed in the desired language. So GTK2 seems to support other locales than "C". What am I doing wrong?
the locale tool is not provided by macports. But MacPorts apps will fetch their localized text in /opt/local/share/locale
Hmmh, that's definitely not true for LC_MONETARY and Gnucash. Gnucash obviously fetches its currency-symbols from /usr/share/locale. So I suspect that other GTK-apps get their locales from /usr/share/locale, too.
By localized text, I mean LC_MESSAGES. You won't find that in /usr
I am a bit confused, because MacPorts is said to be somehow self-reliant, e.g. libraries or apps that might be available from MacOS X' itself (e.g. perl), are normally ignored and rebuilt and installed in /opt/local/... ; It took me ages to figure out that the missing € (EURO) is to be fixed by editing a file in a MacOS X standard directory.
This is very interresting. I wonder why gettext / libiconv don't provide the locale tool and all the LC_ stuff. yves
participants (4)
-
Peter Schneider
-
petr.snyder@yahoo.co.uk
-
Rolf Schäuble
-
Yves de Champlain