You are not logged in.

#1 2010-11-18 12:26:29

Tim-spongefryshoutypants
Member
From: Manchester UK
Registered: 2009-12-13
Posts: 15

No "£" sign in terminals under X

I can't get the £ sign to work in X, SHIFT-3 doesn't output anything at all, but xev does recognise the keypress as the GBP £ sign. If I open an email with a £ sign in it in Mutt I either get '?' or \243 (which I think is the ASCII hex for £). If I switch to a virtual terminal I can type a £, but when I opened an email with mutt it still gave me the \243.

The font I usually use is Bitstream Vera Sans Mono, does anyone know if this font has a £ sign? I've tried a few other fonts but this doesn't seem to help.

When I checked LANG it was set to C, I changed this to en_GB.UTF-8 but this hasn't made a difference.

Any help with this would be greatly appreciated!


I'm a physicist. I have a working knowledge of the entire universe and everything it contains. --Sheldon Cooper

Offline

#2 2010-11-18 13:47:17

manmachine
Member
From: Athens
Registered: 2010-10-28
Posts: 62
Website

Re: No "£" sign in terminals under X

I'm not from the uk, but i do have an ibm keyboard with a uk layout, it works both in my ttys and in xorg.

For your console/ttys make sure you have:
KEYMAP="uk"
in /etc/rc.conf

For anything under xorg:
https://wiki.archlinux.org/index.php/Co … youts_in_X

Or if you're using a DE that supports it (gnome/kde/xfce4/etc...) you can simply use the keyboard preferences gui/applets supplied.

Cheers

Offline

#3 2010-11-18 13:58:18

manmachine
Member
From: Athens
Registered: 2010-10-28
Posts: 62
Website

Re: No "£" sign in terminals under X

Well i should have finished my coffee before replying, just noticed that you say it works on your ttys.
All i can add is that Bitstream Vera Sans Mono does have a £ sign of course and it works...If you can type it/see it yourself, everything is setup as it should. If you can't see it in mail sent by other people maybe their client is at fault for not setting the proper encoding...

Last edited by manmachine (2010-11-18 13:59:08)

Offline

#4 2010-11-18 13:59:03

Tim-spongefryshoutypants
Member
From: Manchester UK
Registered: 2009-12-13
Posts: 15

Re: No "£" sign in terminals under X

Thanks for the reply.

I have the KEYMAP="uk" in my rc.conf, and

Option          "XkbLayout"             "gb"

in my xorg.conf. The rest of the layout works fine so I don't think that's the problem.


I'm a physicist. I have a working knowledge of the entire universe and everything it contains. --Sheldon Cooper

Offline

#5 2010-11-18 14:01:57

Tim-spongefryshoutypants
Member
From: Manchester UK
Registered: 2009-12-13
Posts: 15

Re: No "£" sign in terminals under X

Lol, no problem. Thanks for confirming that Bitstream Vera Sans Mono does have a £ sign.

I can only type it in the ttys, not in my terminals in X. You may be right about the email problem being due to the senders client, but it happens with all emails so I don't know how likely that is.

Thanks.


I'm a physicist. I have a working knowledge of the entire universe and everything it contains. --Sheldon Cooper

Offline

#6 2010-11-18 14:09:58

manmachine
Member
From: Athens
Registered: 2010-10-28
Posts: 62
Website

Re: No "£" sign in terminals under X

It's possible that your DE overrides your settings in xorg. I'm using gnome and i have the layouts setup in the keyboard preferences. You could also add a keyboard applet indicator to make sure that the uk layout is currently activated.

Last edited by manmachine (2010-11-18 14:10:27)

Offline

#7 2010-11-18 14:16:01

Tim-spongefryshoutypants
Member
From: Manchester UK
Registered: 2009-12-13
Posts: 15

Re: No "£" sign in terminals under X

I don't think so, I'm using Awesome at the moment and I don't think it changes any Xorg settings. I've also tried it in KDE, checking that the layout was set to gb, and it still didn't work.


I'm a physicist. I have a working knowledge of the entire universe and everything it contains. --Sheldon Cooper

Offline

#8 2010-11-19 17:51:55

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: No "£" sign in terminals under X

mutt may be a different issue - check charset-hook in the mutt manual.
What terminal emulator do you use in X? My Xdefaults entry for urxvt has this entry:

URXVT.imlocale: en_GB.utf8

£ works for me in both mutt & urxvt cases.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#9 2010-11-22 13:14:12

Tim-spongefryshoutypants
Member
From: Manchester UK
Registered: 2009-12-13
Posts: 15

Re: No "£" sign in terminals under X

I'm using urxvt, but I have the same problem with xterm and aterm. I tried adding that line but with no luck, I will have a look at the mutt charset-hook, thanks.

I have found that if I launch urxvt from a terminal the £ sign works, which is very confusing!


I'm a physicist. I have a working knowledge of the entire universe and everything it contains. --Sheldon Cooper

Offline

#10 2010-11-23 12:05:42

Tim-spongefryshoutypants
Member
From: Manchester UK
Registered: 2009-12-13
Posts: 15

Re: No "£" sign in terminals under X

Ok, I've done some tweaking and made sure that my locale is set correctly

$locale

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

I've found that if I launch a terminal emulator (urxvt, xterm, Eterm) from a terminal the £ sign works (within awesome, fluxbox and KDE), if I launch them directly from awesome, fluxbox or KDE it doesn't work.

Hopefully this may help shed some light on it.


I'm a physicist. I have a working knowledge of the entire universe and everything it contains. --Sheldon Cooper

Offline

#11 2010-11-24 19:18:39

clearloon
Member
Registered: 2009-01-07
Posts: 79

Re: No "£" sign in terminals under X

ok I have *no* idea whether this will help you but I had a problem where KDM was using a US keymap despite en/gb being set *everywhere*. What fixed it for me was adding the following to /etc/X11/xorg.conf.d/01-keyboard-layout.conf:

   Section "InputClass"
       Identifier "keyboard-layout"
       Driver "evdev"
       MatchIsKeyboard "yes"
       Option "XkbLayout" "gb"
   EndSection

This tip used to  be on a page in the wiki that doesn't seem to exist anymore. Google cached version (see bottom) -

http://webcache.googleusercontent.com/s … =firefox-a

Like I say - no idea whether it'll help but if you're stuck might be worth a punt.

Offline

#12 2010-11-25 10:27:29

Tim-spongefryshoutypants
Member
From: Manchester UK
Registered: 2009-12-13
Posts: 15

Re: No "£" sign in terminals under X

Thanks @clearlooon, I've given it a go but it didn't help. But like you say, it was worth a shot.


I'm a physicist. I have a working knowledge of the entire universe and everything it contains. --Sheldon Cooper

Offline

#13 2010-11-25 12:13:20

Xabre
Member
From: Serbia
Registered: 2009-03-19
Posts: 752

Re: No "£" sign in terminals under X

xmodmap -e 'keycode 12 = 3 sterling'

Are u using GDM?

Offline

#14 2010-11-25 12:36:55

Tim-spongefryshoutypants
Member
From: Manchester UK
Registered: 2009-12-13
Posts: 15

Re: No "£" sign in terminals under X

No I'm using slim

The xmodmap didn't help, but I don't think the keymap is the issue as xev recognises the key correctly:

KeyPress event, serial 28, synthetic NO, window 0x2600001,
    root 0x27a, subw 0x0, time 234994078, (349,569), root:(350,589),
    state 0x11, keycode 12 (keysym 0xa3, sterling), same_screen YES,
    XLookupString gives 2 bytes: (c2 a3) "£"
    XmbLookupString gives 2 bytes: (c2 a3) "£"
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2600001,
    root 0x27a, subw 0x0, time 234994278, (349,569), root:(350,589),
    state 0x11, keycode 12 (keysym 0xa3, sterling), same_screen YES,
    XLookupString gives 2 bytes: (c2 a3) "£"
    XFilterEvent returns: False

and if I launch a terminal from within a terminal the key works (although not in mutt). It's the way the character is displayed that seems to be wrong.


I'm a physicist. I have a working knowledge of the entire universe and everything it contains. --Sheldon Cooper

Offline

#15 2010-11-30 19:07:38

onearm
Member
From: Anywhere but here
Registered: 2006-07-06
Posts: 359
Website

Re: No "£" sign in terminals under X

I'm having the same exact problem as the OP but with it locale. Under terminal any character can be printed on screen, under X urxvt doesn't output € and accented vocals when launched directly by awesome (or xinitrc because I don't use a login manager). The curious thing is that I never noticed this problem because booting in init 3 and launching X with startx the problem doesn't show itself; only today when I booted in init 5 urxvt showed this issue.
Being root or user doesn't make any difference


To get something done, a committee should consist of no more than three persons, two of them absent.
--
My Github

Offline

Board footer

Powered by FluxBB