You are not logged in.

#1 2006-07-25 09:37:42

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

locale not supported by C library [solved]

When running a xdialog script, I am getting this error.
Gdk-WARNING **: locale not supported by C library

Example:

#!/bin/sh

Xdialog --title "TEST BOX" 
        --msgbox "Hi, this is a simple message box. You can use this to
display any message you like. The box will remain until
you press the ENTER key." 10 41

case $? in
  0)
    echo "OK";;
  255)
    echo "Box closed.";;
esac

Markku

Offline

#2 2006-07-25 15:57:36

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: locale not supported by C library [solved]

In /etc/locale.gen, uncomment the locales that you are using and run locale-gen as root.

Offline

#3 2006-07-25 19:53:56

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

Re: locale not supported by C library [solved]

I added "export LANG=C" in the script, works fine.


Markku

Offline

#4 2006-07-25 20:36:37

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: locale not supported by C library [solved]

rasat! [solved]! lol

Offline

#5 2006-07-26 03:10:30

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

Re: locale not supported by C library [solved]

lol


Markku

Offline

#6 2006-07-26 15:02:55

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: locale not supported by C library [solved]

The "export LANG=C" part isn't a solution.  It's a hack.  The real fix is to do what Snowman said and actually generate your locales.  The "locale not supported" message means you did not generate the locale info for the locale you're running under.

To generate these files, you need to uncomment any and all locales you use in /etc/locale.gen and then run "locale-gen" as root, as Snowman mentioned.

Offline

#7 2006-07-27 12:05:18

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

Re: locale not supported by C library [solved]

phrakture wrote:

The "locale not supported" message means you did not generate the locale info for the locale you're running under.

For my information, where its said to do this? When installing a fresh install and all packages updated, the locale problem is there. Is this a bug or something what everyone supposed to know?

Why the default locale configure is not enough in /etc/rc.conf, why to bother about /etc/locale.gen?

rc.conf wrote:

LOCALE="en_US.utf8"

EDIT:
I took a look at /etc/locale.gen. I don't know what to uncomment, its like reading a foreign language. smile


Markku

Offline

Board footer

Powered by FluxBB