public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user]  Warning: locale not supported by Xlib, locale set to C
@ 2008-07-19 18:37 Miernik
  2008-07-19 20:59 ` Dirk Heinrichs
  0 siblings, 1 reply; 7+ messages in thread
From: Miernik @ 2008-07-19 18:37 UTC (permalink / raw
  To: gentoo-user

I installed Gentoo recently, and have the following problem: In xterm I
cannot see non-ASCII chars, when I 'cat' a file with UTF-8 characters,
garbage comes out. In other applications (gnumeric, firefox), UTF-8
functions correctly. How to fix it?

When I start another XTerm from one XTerm, I see this message in the old
XTerm:

Warning: locale not supported by Xlib, locale set to C

Some diags:

miernik@przehyba ~ $ locale
LANG=en_DK.UTF-8
LC_CTYPE="en_DK.UTF-8"
LC_NUMERIC="en_DK.UTF-8"
LC_TIME="en_DK.UTF-8"
LC_COLLATE="en_DK.UTF-8"
LC_MONETARY="en_DK.UTF-8"
LC_MESSAGES="en_DK.UTF-8"
LC_PAPER="en_DK.UTF-8"
LC_NAME="en_DK.UTF-8"
LC_ADDRESS="en_DK.UTF-8"
LC_TELEPHONE="en_DK.UTF-8"
LC_MEASUREMENT="en_DK.UTF-8"
LC_IDENTIFICATION="en_DK.UTF-8"
LC_ALL=
miernik@przehyba ~ $ locale -a
C
en_DK.utf8
POSIX
miernik@przehyba ~ $ cat /etc/env.d/02locale
LANG="en_DK.UTF-8"
miernik@przehyba ~ $ cat /etc/locale.gen | grep -v "^#"
en_DK.UTF-8 UTF-8
miernik@przehyba ~ $


I re-emerged xterm, x11-libs/libX11, glibc, but didn't help.

Any ideas?

-- 
Miernik
http://miernik.name/

-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user]  Warning: locale not supported by Xlib, locale set to C
  2008-07-19 18:37 [gentoo-user] Warning: locale not supported by Xlib, locale set to C Miernik
@ 2008-07-19 20:59 ` Dirk Heinrichs
  2008-07-20  9:15   ` [gentoo-user] " Miernik
  0 siblings, 1 reply; 7+ messages in thread
From: Dirk Heinrichs @ 2008-07-19 20:59 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 264 bytes --]

Am Samstag, 19. Juli 2008 schrieb Miernik:

> Warning: locale not supported by Xlib, locale set to C
>
> Some diags:
>
> miernik@przehyba ~ $ locale
> LANG=en_DK.UTF-8
> miernik@przehyba ~ $ locale -a
> en_DK.utf8

And you don't see the difference?

Bye...

	Dirk

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-user]  Re: Warning: locale not supported by Xlib, locale set to C
  2008-07-19 20:59 ` Dirk Heinrichs
@ 2008-07-20  9:15   ` Miernik
  2008-07-20 14:43     ` Dirk Heinrichs
  0 siblings, 1 reply; 7+ messages in thread
From: Miernik @ 2008-07-20  9:15 UTC (permalink / raw
  To: gentoo-user

Dirk Heinrichs <dirk.heinrichs@online.de> wrote:
>> miernik@przehyba ~ $ locale
>> LANG=en_DK.UTF-8
>> miernik@przehyba ~ $ locale -a
>> en_DK.utf8
> 
> And you don't see the difference?

But...

przehyba ~ # cat /usr/share/i18n/SUPPORTED | grep en | grep DK
en_DK.UTF-8 UTF-8
en_DK ISO-8859-1
przehyba ~ #

So why 'locale -a' tells me that the available locale has "utf8" at the
end, while the file in /usr/share/i18n/ tells me its capital leters
"UTF-8"? And all documentation I can remember tells me to use ".UTF-8",
I've never in my life seen ".utf8" before, I use locales with ".UTF-8"
ending on Debian since ages, why here is this strange lowercase "utf8"
in one place, and how did it happen to get there?

http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=6
tells to use capital "UTF-8"

http://www.gentoo.org/doc/en/utf-8.xml
shows that 'locale -a' should output capital "UTF-8"

However I still don't know how to solve the problem, I changed the text
in /etc/env.d/02locale to "en_DK.utf8", then run
env-update && source /etc/profile
and rebooted the machine after that just to be sure, but that didn't fix
the problem - UTF-8 files don't work when 'cat', and starting an xterm
still shows "Warning: locale not supported by Xlib, locale set to C".
Only now "locale" command shows the lowercase version.

I did read the above URL's, and
http://www.gentoo.org/doc/en/guide-localization.xml
and I am out of ideas. What a mess... and I didn't ever before anywhere
enter ".utf8" ending in the locale while installing this system, nor in
my life, so it's not me who messed it up! I did how all the manuals
showed - uppercase .UTF-8

Is there any hope for me, or should I reinstall Gentoo from scratch,
to a blank disk, and pray that my locales will work after that? However
I'm sceptical that will produce any different result than I have,
because I'll probably do everything exactly as I did now.

-- 
Miernik
http://miernik.name/




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user]  Re: Warning: locale not supported by Xlib, locale set to C
  2008-07-20  9:15   ` [gentoo-user] " Miernik
@ 2008-07-20 14:43     ` Dirk Heinrichs
  2008-07-21  6:02       ` Miernik
  0 siblings, 1 reply; 7+ messages in thread
From: Dirk Heinrichs @ 2008-07-20 14:43 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]

Am Sonntag, 20. Juli 2008 schrieb Miernik:
> Dirk Heinrichs <dirk.heinrichs@online.de> wrote:
> >> miernik@przehyba ~ $ locale
> >> LANG=en_DK.UTF-8
> >> miernik@przehyba ~ $ locale -a
> >> en_DK.utf8
> >
> > And you don't see the difference?
>
> But...
>
> przehyba ~ # cat /usr/share/i18n/SUPPORTED | grep en | grep DK
> en_DK.UTF-8 UTF-8
> en_DK ISO-8859-1
> przehyba ~ #
>
> So why 'locale -a' tells me that the available locale has "utf8" at the
> end, while the file in /usr/share/i18n/ tells me its capital leters
> "UTF-8"? And all documentation I can remember tells me to use ".UTF-8",
> I've never in my life seen ".utf8" before, I use locales with ".UTF-8"
> ending on Debian since ages, why here is this strange lowercase "utf8"
> in one place, and how did it happen to get there?

OK, you're right. A little bit of further reading (German Gentoo UTF8 Howto) 
revealed that they should both be equivalent.

> UTF-8 files don't work when 'cat'

Are you sure these files are really utf8 files? What does the "file" command 
tell you about those files. Maybe you need to run iconv on them, first.

> , and starting an xterm 
> still shows "Warning: locale not supported by Xlib, locale set to C".
> Only now "locale" command shows the lowercase version.

This is a different thing, look at 
http://bugs.gentoo.org/show_bug.cgi?id=90972

HTH...

	Dirk

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-user]  Re: Warning: locale not supported by Xlib, locale set to C
  2008-07-20 14:43     ` Dirk Heinrichs
@ 2008-07-21  6:02       ` Miernik
  2008-07-21  8:11         ` Jan Seeger
  0 siblings, 1 reply; 7+ messages in thread
From: Miernik @ 2008-07-21  6:02 UTC (permalink / raw
  To: gentoo-user

Dirk Heinrichs <dirk.heinrichs@online.de> wrote:
> Are you sure these files are really utf8 files? What does the "file"
> command tell you about those files. Maybe you need to run iconv on
> them, first.
> 
>> , and starting an xterm still shows "Warning: locale not supported by
>> Xlib, locale set to C".  Only now "locale" command shows the
>> lowercase version.
> 
> This is a different thing, look at
> http://bugs.gentoo.org/show_bug.cgi?id=90972

Well, it was all the problem of having en_DK, I changed it to
en_US.UTF-8 and all works OK now. However I wanted _DK to have the
locale date in the form 2008-07-19 and not 07/21/2008.

Anyway, why is this we have to choose a territory for our language, I do
not live in any english-speaking territory, nor it is Denmark, and I
don't want to put on my computer on what territory I live, as it is none
of it's business. Couldn't there be something like POSIX.UTF-8 locale,
or maybe make the POSIX locale be UTF-8 by default? Or C.UTF-8
I would be very happy not having to put any specific country in the
settings of my computer.

And ordering of date - what does that have to do with territory and
language? I don't care what territory has what ordering commonly used -
I want to have it in form 2008-07-19, is there a way to do it?

-- 
Miernik
http://miernik.name/




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user]  Re: Warning: locale not supported by Xlib, locale set to C
  2008-07-21  6:02       ` Miernik
@ 2008-07-21  8:11         ` Jan Seeger
  2008-07-21 10:46           ` Miernik
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Seeger @ 2008-07-21  8:11 UTC (permalink / raw
  To: gentoo-user

At Mon, 21 Jul 2008 08:02:58 +0200,
Miernik  wrote:
> Anyway, why is this we have to choose a territory for our language, I do
> not live in any english-speaking territory, nor it is Denmark, and I
> don't want to put on my computer on what territory I live, as it is none
> of it's business. Couldn't there be something like POSIX.UTF-8 locale,
> or maybe make the POSIX locale be UTF-8 by default? Or C.UTF-8
> I would be very happy not having to put any specific country in the
> settings of my computer.

Why? Are you planning on moving?^^ But have you tried POSIX.UTF-8?
Because it sounds sensible, and thus could be already implemented.

> And ordering of date - what does that have to do with territory and
> language? I don't care what territory has what ordering commonly used -
> I want to have it in form 2008-07-19, is there a way to do it?

That's just a shortcut, so you don't have to set every setting
explicitly. If you want, just set the respective LC_* variables, for
example LC_TIME for the right time format.
--
Four bits at a time
www.thenybble.de



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-user]  Re: Warning: locale not supported by Xlib, locale set to C
  2008-07-21  8:11         ` Jan Seeger
@ 2008-07-21 10:46           ` Miernik
  0 siblings, 0 replies; 7+ messages in thread
From: Miernik @ 2008-07-21 10:46 UTC (permalink / raw
  To: gentoo-user

Jan Seeger <jan.seeger@thenybble.de> wrote:
> Why? Are you planning on moving?^^

Because how I like my computer to communicate with me, has nothing to do
with the territory on which it is located, the computer moved across
different territories, my computers are often on different territories
that I am, none of the territories the computer or I are frequently
located speak the language I want my computer to communicate in, nor do
their standard of dates are how I like then to be - I choose them to be
based on reason (dates shown from largest unit to smallest), not on
tradition or politics. I feel a world citizen, and don't want to be
psychologically tied to any single country, nor my computers, I feel its
horribly stupid to configure computers based on territory, its an
unneeded breach of privacy in case someone looks over my shoulder as I
type "locale" and sees a territory, then he/she would think I might have
ties to that territory, like if its the police or something, if I put
en_US than someone might think I am an US person, while I am not, and I
don't want to spend my time wondering which territory I should put in
when installing Linux, US, or GB or whatever, I just want a damn simple
international english territory neutral locale with dates in the form
YYYY-MM-DD and 24-hour clock time and . as the decimal separator (not ,
as it is in the en_DK locale). Is that so difficult to do?

> But have you tried POSIX.UTF-8?
> Because it sounds sensible, and thus could be already implemented.

Yes, but some errors where encountered:

przehyba ~ # locale-gen
 * Generating 2 locales (this might take a while) with 1 jobs
 *  (1/2) Generating POSIX.UTF-8 ...
LC_MONETARY: value of field `int_curr_symbol' has wrong length
No definition for LC_PAPER category found
No definition for LC_NAME category found
No definition for LC_ADDRESS category found
No definition for LC_TELEPHONE category found
No definition for LC_MEASUREMENT category found
No definition for LC_IDENTIFICATION category found         [ !! ]
 *  (2/2) Generating en_US.UTF-8 ...                       [ ok ]
 * Generation complete
przehyba ~ #

Not sure if they are a problem.

Will try to use that locale and see if I get any problems.
However C.UTF-8 doesn't work at all. What's the difference between POSIX
and C? Where does the C locale name come from? From the C programming
language, or something else?

>> And ordering of date - what does that have to do with territory and
>> language? I don't care what territory has what ordering commonly used -
>> I want to have it in form 2008-07-19, is there a way to do it?
> 
> That's just a shortcut, so you don't have to set every setting
> explicitly. If you want, just set the respective LC_* variables, for
> example LC_TIME for the right time format.

How can I tell to LC_TIME that I want dates in yyyy-mm-dd format, and
24-hour clock time, and if anything wants week or month name, then show
it in english? If en_DK locale is invalid for Xlib, and no other
english laguage locale has dates in yyyy-mm-dd format?

-- 
Miernik
http://miernik.name/




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-07-21 10:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-19 18:37 [gentoo-user] Warning: locale not supported by Xlib, locale set to C Miernik
2008-07-19 20:59 ` Dirk Heinrichs
2008-07-20  9:15   ` [gentoo-user] " Miernik
2008-07-20 14:43     ` Dirk Heinrichs
2008-07-21  6:02       ` Miernik
2008-07-21  8:11         ` Jan Seeger
2008-07-21 10:46           ` Miernik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox