You are not logged in.

#1 2013-05-24 04:42:16

duffc
Member
Registered: 2013-05-24
Posts: 5

[Solved] Fonts/terminals do not display properly.

Hello, I'm having a weird issue with my fonts/terminals.  I mostly use rxvt-unicode-256color installed from AUR, but this happens in xterm as well.  My terminal would display an "â" symbol instead of the characters it's supposed to.  I copied my .Xresources, .bashrc over to another computer and had no issues on it.  Both systems are using the same font, terminus. 

Since I'm not great at explaining things, I've provided a screenshot using the pacman color sciprt as reference,  The top terminal is the one with the issue, the bottom terminal is how the script is supposed to look.

Any help or pointing me in the right direction would be appreciated.

z5nehUC.png

Last edited by duffc (2013-05-26 02:17:45)

Offline

#2 2013-05-24 04:57:24

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: [Solved] Fonts/terminals do not display properly.

What are your locale settings? I have a feeling that the problem is in those settings.

All the best,

-HG

Last edited by HalosGhost (2013-05-24 04:57:42)

Offline

#3 2013-05-24 05:22:29

duffc
Member
Registered: 2013-05-24
Posts: 5

Re: [Solved] Fonts/terminals do not display properly.

HalosGhost wrote:

What are your locale settings? I have a feeling that the problem is in those settings.

All the best,

-HG

locale -a

C
POSIX
en_US.utf8

locale

LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

locale.conf

LANG=en_US.UTF-8

Last edited by duffc (2013-05-24 06:31:40)

Offline

#4 2013-05-24 05:32:29

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved] Fonts/terminals do not display properly.

Does your locale.conf really have "/etc/locale.conf (end)" in it?  That surely isn't supposed to be there.  This may be how all of your locale ended up as 'C'.

Here is mine for reference of how it should be:

% locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Edit: I should probably include this as well, as it is the important part:

% cat  cat /etc/locale.conf 
LANG="en_US.UTF-8"

Last edited by WonderWoofy (2013-05-24 05:34:08)

Offline

#5 2013-05-24 05:36:57

duffc
Member
Registered: 2013-05-24
Posts: 5

Re: [Solved] Fonts/terminals do not display properly.

WonderWoofy wrote:

Does your locale.conf really have "/etc/locale.conf (end)" in it?  That surely isn't supposed to be there.  This may be how all of your locale ended up as 'C'.

Here is mine for reference of how it should be:

% locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Edit: I should probably include this as well, as it is the important part:

% cat  cat /etc/locale.conf 
LANG="en_US.UTF-8"

Oops, no it doesn't, fixed.

Offline

#6 2013-05-24 05:44:19

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved] Fonts/terminals do not display properly.

Just FYI, instead of using quote tags for command output, you should really be using code tags.  They just create a nice way to easily distinguish between the two.

So your locale still shouldn't be all 'C'.  So you need to figure out why you are getting that... what might be setting that.

Offline

#7 2013-05-24 06:00:40

duffc
Member
Registered: 2013-05-24
Posts: 5

Re: [Solved] Fonts/terminals do not display properly.

WonderWoofy wrote:

Just FYI, instead of using quote tags for command output, you should really be using code tags.  They just create a nice way to easily distinguish between the two.

So your locale still shouldn't be all 'C'.  So you need to figure out why you are getting that... what might be setting that.

Ty for the advice, I guess I should note that everything works fine under console, so it most be something X is loading.

Offline

#8 2013-05-24 06:02:19

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved] Fonts/terminals do not display properly.

What happens if you put quotes around your LANG= setting, like mine.  I don't actually know that this is necessary... but I figure I must have put mine there for a reason... I think.

Edit: BTW, you can't just edit the file and expect it to be better either.  You also have to export the variable.  But I just tried setting my LANG w/o quotes and it worked just fine.  So this is probably a nevermind moment.

Last edited by WonderWoofy (2013-05-24 06:05:03)

Offline

#9 2013-05-24 06:17:07

duffc
Member
Registered: 2013-05-24
Posts: 5

Re: [Solved] Fonts/terminals do not display properly.

WonderWoofy wrote:

What happens if you put quotes around your LANG= setting, like mine.  I don't actually know that this is necessary... but I figure I must have put mine there for a reason... I think.

Edit: BTW, you can't just edit the file and expect it to be better either.  You also have to export the variable.  But I just tried setting my LANG w/o quotes and it worked just fine.  So this is probably a nevermind moment.

I figured something out,  I found a file called "locale.alias" that had all kinds of stuff set.  I backed it up and moved it, did a locale-gen, and rebooted, and everything is working fine now.  My locale looks just like yours.  Not sure how that locale.alias filed ended up there.  The file was located in /usr/share/X11/locale, so is that maybe why my locale was changing when X started?

Last edited by duffc (2013-05-24 06:19:03)

Offline

#10 2013-05-24 07:11:45

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved] Fonts/terminals do not display properly.

That is really interesting, as that *should* be a normal file that is provided by the libx11 package.  It *should* be of no consequence to your locale configuration whatsoever.  But hey, whatever you did seemed to fix it, so way to go!

Please mark the thread as [Solved] by editing the first post, which will also allow you to edit the title.  Unfortunately, I am not sure that what your solution was is actually going to help someone in the future... oh well.  Enjoy not having the accented "a" anymore.

Offline

#11 2013-05-24 10:17:18

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [Solved] Fonts/terminals do not display properly.

duffc wrote:

I figured something out,  I found a file called "locale.alias" that had all kinds of stuff set.  I backed it up and moved it, did a locale-gen, and rebooted, and everything is working fine now.  My locale looks just like yours.  Not sure how that locale.alias filed ended up there.  The file was located in /usr/share/X11/locale, so is that maybe why my locale was changing when X started?

What an odd solution!  Do be aware that that file is going to be recreated with a future update:

$ pacman -Qo /usr/share/X11/locale/locale.alias
/usr/share/X11/locale/locale.alias is owned by libx11 1.5.0-2

As far as I can figure out, locale.alias provides alternate names (strings) for valid locales, similar to font or shell aliases.  But I've got more than one locale.alias file:

$ locate locale.alias
/usr/share/X11/locale/locale.alias
/usr/share/gettext/intl/locale.alias
/usr/share/locale/locale.alias

The locale.alias that is read last probably determines which alias file takes takes precedence.  With the terminal emulators, I might suspect luit.  From luit's manpage, under 'OPTIONS':

-alias filename
       the locale alias file
       (default: /usr/share/X11/locale/locale.alias).

Offline

Board footer

Powered by FluxBB