Results 1 to 2 of 2

Thread: Warning: locale not supported by C library, locale unchanged

  1. #1
    harders NNTP User

    Default Warning: locale not supported by C library, locale unchanged

    Dear all,

    when starting a lot of X Window related programs (e.g., gv), I get the message

    Warning: locale not supported by C library, locale unchanged

    in the shell. In other programs (e.g., acroread, gimp), the message is:

    Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.

    Maybe as one result, the desired character set Utf8 is not used. This for example results in acroread that I cannot search for strings using Umlauts. The error message in this case is

    WARNING **: Error converting text from IM to UTF-8: Invalid byte sequence in conversion input

    In the bash shell, typing in any umlauts results in strange behaviour. Some umlauts are shown but characters around them are eaten up and other strange things. Also, less cannot display any Umlauts, neither in latin1 nor in utf8 encoding.

    I am not sure whether the environment is set incorrect or whether the locale installation is broken. Does anybody have a glue how I can solve this problem?

    I am using openSUSE 10.3 (X86-64) with following parameters:

    Output of uname -a:
    Linux fest 2.6.22.19-0.3-default #1 SMP 2009-05-27 10:35:34 +0200 x86_64 x86_64 x86_64 GNU/Linux

    Output of locale:
    locale: Kann LC_ALL nicht auf die Standard-Lokale einstellen: Datei oder Verzeic
    hnis nicht gefunden
    LANG=de_DE.utf8
    LC_CTYPE="de_DE.utf8"
    LC_NUMERIC="de_DE.utf8"
    LC_TIME=%a %F %X %Z
    LC_COLLATE="de_DE.utf8"
    LC_MONETARY="de_DE.utf8"
    LC_MESSAGES="de_DE.utf8"
    LC_PAPER="de_DE.utf8"
    LC_NAME="de_DE.utf8"
    LC_ADDRESS="de_DE.utf8"
    LC_TELEPHONE="de_DE.utf8"
    LC_MEASUREMENT="de_DE.utf8"
    LC_IDENTIFICATION="de_DE.utf8"
    LC_ALL=

    The directory /usr/lib/locale/de_DE.utf8 contains following files:
    -rw-r--r-- 1 root root 159 2007-09-21 20:52 LC_ADDRESS
    -rw-r--r-- 108 root root 915314 2007-09-21 20:51 LC_COLLATE
    -rw-r--r-- 5 root root 254180 2007-09-21 20:52 LC_CTYPE
    -rw-r--r-- 1 root root 375 2007-09-21 20:52 LC_IDENTIFICATION
    -rw-r--r-- 229 root root 23 2007-09-21 20:51 LC_MEASUREMENT
    drwxr-xr-x 2 root root 4096 2008-03-01 22:46 LC_MESSAGES
    -rw-r--r-- 6 root root 294 2007-09-21 20:52 LC_MONETARY
    -rw-r--r-- 1 root root 83 2007-09-21 20:52 LC_NAME
    -rw-r--r-- 34 root root 54 2007-09-21 20:52 LC_NUMERIC
    -rw-r--r-- 227 root root 34 2007-09-21 20:51 LC_PAPER
    -rw-r--r-- 2 root root 56 2007-09-21 20:52 LC_TELEPHONE
    -rw-r--r-- 1 root root 2354 2007-09-21 20:52 LC_TIME

    If I unset the environment variable LC_TIME, the warning messages disappear but utf8 still isn't used resulting in the same problems.

    I hope I posted all necessary information to help me. If not please write what you need.

    Best regards and thank you very much,
    Harald

  2. #2
    harders NNTP User

    Smile Re: Warning: locale not supported by C library, locale uncha

    All-clear!

    After such a long time I wasn't able to solve the problem I managed to find it today after posting this question.

    The key to success was:
    strace -e trace=open gv

    One of the lines of output was:
    open("/usr/lib/locale/%a %F %X %Z/LC_TIME")

    I simply misunderstood the use of LC_TIME. I set it to the time format rather than the locale to use. After removing it from the startup procedure everything except acroread worked.

    Acroread required a separate solution:
    In the script acroread, a line
    LANG=de_DE
    had to be added (my normal locale is de_DE.UTF-8) in the beginning.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •