[maemo-users] Unlocalised browser when launched from ssh (OS2008)

From: Tommi Komulainen tommi.komulainen at nokia.com
Date: Wed Jan 2 13:42:14 EET 2008
On Wed, 2008-01-02 at 12:44 +0200, Eero Tamminen wrote:

> Hm.  I guess it would be an upstream Gnome/Gtk bug in this case.
> If it cannot find locale for one of the locale settings,
> it sets everything to C locale...  It should set only
> the given locale setting to C locale (or to what LC_ALL
> has if that is set).

gtk does
  if (!setlocale(LC_ALL, ""))
    g_warning ("Locale not supported by C library.\n\tUsing the fallback 'C' locale.");

On error case (invalid locale) setlocale does nothing -- which
practically is same as setting everything to C. As documented in

In any case you should probably use 'run-standalone.sh browser [..]' to
start applications from command line.


> char *setlocale(int category, const char *locale);

> If locale is "", each part of the locale that should be modified is
> set according to the environment variables. The details are
> implementation dependent. For glibc, first (regardless of category),
> the environment variable LC_ALL is inspected, next the environment
> variable with the same name as the category (LC_COLLATE, LC_CTYPE,
> environment variable LANG. The first existing environment variable is
> used. If its value is not a valid locale specification, the locale is
> unchanged, and setlocale() returns NULL.

Tommi Komulainen                            <tommi.komulainen at nokia.com>

More information about the maemo-users mailing list