You are not logged in.

#1 2010-01-01 10:59:47

daf666
Member
Registered: 2007-04-08
Posts: 470
Website

[Solved] locale issues with Xorg or GCC, garbage in shell.

When I use the en_US.UTF-8 UTF-8 locale (the only one enabled in /etc/locale.gen, I get garbage from programs, for example:

daf666@pazuzu ~/Desktop
$ gcc lala2.c -o lala2 -Wall
lala2.c: In function â:
lala2.c:12: error: expected â before â

When using en_US ISO-8859-1, it becomes OK in the shell, but other problems happen in Xorg applications:

daf666@pazuzu ~/Desktop
$ gcc lala2.c -o lala2 -Wall
lala2.c: In function 'printargs':
lala2.c:12: error: expected ';' before 'printf'
daf666@pazuzu ~/Desktop
$ tcpjunk -x

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

It seems that no specific locale solves this conflict, even if I enable them both... any ideas?

Last edited by daf666 (2010-01-01 21:34:51)

Offline

#2 2010-01-01 11:55:51

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: [Solved] locale issues with Xorg or GCC, garbage in shell.

I suspect the terminal emulator you are using does not support UTF-8.  Do you have the same behavior in a terminal emulator which supports unicode, such as urxvt?

Last edited by chpln (2010-01-01 11:58:27)

Offline

#3 2010-01-01 21:34:34

daf666
Member
Registered: 2007-04-08
Posts: 470
Website

Re: [Solved] locale issues with Xorg or GCC, garbage in shell.

Indeed I was using xterm, its OK in gnome-terminal/urxvt, thanks!

Offline

#4 2010-01-01 23:02:53

dickey
Member
Registered: 2009-06-01
Posts: 35

Re: [Solved] locale issues with Xorg or GCC, garbage in shell.

The uxterm script sets up xterm to use UTF-8 locale.

Offline

Board footer

Powered by FluxBB