You are not logged in.

#1 2012-12-22 14:12:47

SaaldjorMike
Member
From: Denmark
Registered: 2012-12-22
Posts: 9

[SOLVED] urxvt ignoring danish characters

Hi,

When I try to type the danish æøå characters in the terminal, nothing really seems to happen. I've set up the danish locale:

mike@ul30vt ~ $ localectl status
    System Locale: LANG=en_DK.UTF-8
        VC Keymap: dk
        X11 Layout: dk
        X11 Model: pc105
        X11 Options: terminate:ctrl_alt_bksp

I'm using an Asus UL30VT laptop, and this happened after migrating to systemd+installing some upgrades.
If i try to copy the 'ø' character from chromium and put it in the urxvt window, bash seems to act like this:

mike@ul30vt ~ $ ø
bash: $'\303\270': command not found

It seems to be a two part problem if I'm not totally off.

  1. Inputting æøå characters doesn't really do anything visually in urxvt

  2. Bash seems to respond some code instead of viewing the character itself.

Any suggestions on how to fix this? If you need more information, just tell me and I'll post it ASAP.

More info:

mike@ul30vt ~ $ 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=
mike@ul30vt ~ $ grep -v "#" /etc/locale.gen
en_DK.UTF-8 UTF-8  
en_DK ISO-8859-1

Last edited by SaaldjorMike (2012-12-22 22:03:08)

Offline

#2 2012-12-22 19:51:54

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: [SOLVED] urxvt ignoring danish characters

setxkbmap dk

Offline

#3 2012-12-22 20:02:25

SaaldjorMike
Member
From: Denmark
Registered: 2012-12-22
Posts: 9

Re: [SOLVED] urxvt ignoring danish characters

mhertz wrote:
setxkbmap dk

Didn't seem to have any influence to the result.
I also posted this problem on reddit:
http://www.reddit.com/r/archlinux/comme … haracters/

Offline

#4 2012-12-22 20:20:27

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: [SOLVED] urxvt ignoring danish characters

Hmm, running 'setxkbmap dk' sets keymap to use for X11, and so are you using a font that dosen't support æøå in urxvt?

Try to start urxvt with a font that I know works, like this: 'urxvt -fn 9x15', and then type 'setxkbmap dk' and then 'æøå'...

Also does those chars work in xterm?

Offline

#5 2012-12-22 20:32:00

SaaldjorMike
Member
From: Denmark
Registered: 2012-12-22
Posts: 9

Re: [SOLVED] urxvt ignoring danish characters

mhertz wrote:

Hmm, running 'setxkbmap dk' sets keymap to use for X11, and so are you using a font that dosen't support æøå in urxvt?

Well, yeah! I'm using the exact same font as before migrating to systemd and installing a set of upgrades.

mhertz wrote:

Try to start urxvt with a font that I know works, like this: 'urxvt -fn 9x15', and then type 'setxkbmap dk' and then 'æøå'...

I did exactly this and same 'missing' response here.

mhertz wrote:

Also does those chars work in xterm?

If i run "xterm -u8" and press "æøå" they do work, yes.

Try to see my post and also the responses on the reddit post: http://www.reddit.com/r/archlinux/comme … haracters/
The post contains a few debug outputs - more specifically see the error I got while running xev.

Offline

#6 2012-12-22 21:01:15

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: [SOLVED] urxvt ignoring danish characters

Sorry, I really don't have a clue what's wrong on your end?

I quickly glanced at the reddit page, and just wanted to say that æøå dosen't need utf8, as those chars are part of standard iso8859-1, and so works with xterm without the -u8 also. Also the loadkeys suggestion is wrong, as that's stricktly for the console and not X11.

Btw, I have this xev output:

KeyPress event, serial 31, synthetic NO, window 0x1000001,
    root 0xac, subw 0x0, time 15035891, (-78,452), root:(633,471),
    state 0x10, keycode 47 (keysym 0xe6, ae), same_screen YES,
    XLookupString gives 2 bytes: (c3 a6) "æ"
    XmbLookupString gives 2 bytes: (c3 a6) "æ"
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x1000001,
    root 0xac, subw 0x0, time 15035961, (-78,452), root:(633,471),
    state 0x10, keycode 47 (keysym 0xe6, ae), same_screen YES,
    XLookupString gives 2 bytes: (c3 a6) "æ"
    XFilterEvent returns: False

KeyPress event, serial 31, synthetic NO, window 0x1000001,
    root 0xac, subw 0x0, time 15045225, (-78,452), root:(633,471),
    state 0x10, keycode 48 (keysym 0xf8, oslash), same_screen YES,
    XLookupString gives 2 bytes: (c3 b8) "ø"
    XmbLookupString gives 2 bytes: (c3 b8) "ø"
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x1000001,
    root 0xac, subw 0x0, time 15045331, (-78,452), root:(633,471),
    state 0x10, keycode 48 (keysym 0xf8, oslash), same_screen YES,
    XLookupString gives 2 bytes: (c3 b8) "ø"
    XFilterEvent returns: False

KeyPress event, serial 31, synthetic NO, window 0x1000001,
    root 0xac, subw 0x0, time 15046078, (-78,452), root:(633,471),
    state 0x10, keycode 34 (keysym 0xe5, aring), same_screen YES,
    XLookupString gives 2 bytes: (c3 a5) "å"
    XmbLookupString gives 2 bytes: (c3 a5) "å"
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x1000001,
    root 0xac, subw 0x0, time 15046150, (-78,452), root:(633,471),
    state 0x10, keycode 34 (keysym 0xe5, aring), same_screen YES,
    XLookupString gives 2 bytes: (c3 a5) "å"
    XFilterEvent returns: False

Offline

#7 2012-12-22 21:18:59

SaaldjorMike
Member
From: Denmark
Registered: 2012-12-22
Posts: 9

Re: [SOLVED] urxvt ignoring danish characters

mhertz wrote:

Sorry, I really don't have a clue what's wrong on your end?

I quickly glanced at the reddit page, and just wanted to say that æøå dosen't need utf8, as those chars are part of standard iso8859-1, and so works with xterm without the -u8 also. Also the loadkeys suggestion is wrong, as that's stricktly for the console and not X11.

I'm pretty sure that the following is somehow a part of the problem:

mike@ul30vt ~ $ xev
xev:  XSetLocaleModifiers failed
xev:  XOpenIM failed
Outer window is 0x2200001, inner window is 0x220000

If you compare the two outputs from xev for pressing the æ-key, there is a clear difference.

My output:

KeyPress event, serial 29, synthetic NO, window 0x1a00001,
    root 0xad, subw 0x0, time 5681476, (569,511), root:(570,531),
    state 0x0, keycode 47 (keysym 0xe6, ae), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Your output:

KeyPress event, serial 31, synthetic NO, window 0x1000001,
    root 0xac, subw 0x0, time 15035891, (-78,452), root:(633,471),
    state 0x10, keycode 47 (keysym 0xe6, ae), same_screen YES,
    XLookupString gives 2 bytes: (c3 a6) "æ"
    XmbLookupString gives 2 bytes: (c3 a6) "æ"
    XFilterEvent returns: False

Offline

#8 2012-12-22 21:41:10

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: [SOLVED] urxvt ignoring danish characters

I had competelly forgotten it, but after some googling around I remembered reading many issues with æøå and your locale, and because of that, I myself just use en_US.UTF-8 instead, but unfortunetly I cannot help you with a solution, other than changing locale...

Offline

#9 2012-12-22 21:57:40

SaaldjorMike
Member
From: Denmark
Registered: 2012-12-22
Posts: 9

Re: [SOLVED] urxvt ignoring danish characters

mhertz wrote:

I had competelly forgotten it, but after some googling around I remembered reading many issues with æøå and your locale, and because of that, I myself just use en_US.UTF-8 instead, but unfortunetly I cannot help you with a solution, other than changing locale...

Sigh. I tried changing the locale to both en_GB.UTF-8 and en_GB.UTF-8 and both seems to work fine. Guess there must be some sort of bug related to the locale en_DK.UTF-8.

UPDATE: By adding a few lines it is now working.

mike@ul30vt /usr/share/X11/locale $ diff compose.dir compose.dir.bak 
284d283
< en_US.UTF-8/Compose       en_DK.UTF-8
705d703
< en_US.UTF-8/Compose:      en_DK.UTF-8
mike@ul30vt /usr/share/X11/locale $ diff locale.dir locale.dir.bak 
304d303
< en_US.UTF-8/XLC_LOCALE            en_DK.UTF-8
752d750
< en_US.UTF-8/XLC_LOCALE:           en_DK.UTF-8

Then I changed locale again:

localectl set-locale LANG=en_DK.UTF-8

Checking if the locale has been correctly set and then testing the keys:

mike@ul30vt /usr/share/X11/locale $ localectl status
System Locale: LANG=en_DK.UTF-8
    VC Keymap: dk
   X11 Layout: dk
    X11 Model: pc105
  X11 Options: terminate:ctrl_alt_bksp

mike@ul30vt /usr/share/X11/locale $ 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=

mike@ul30vt /usr/share/X11/locale $ æøå
bash: $'\303\246\303\270\303\245': command not found

Now it works! Yay. Only thing not so pretty is the print from bash just above this.

Last edited by SaaldjorMike (2012-12-23 00:33:31)

Offline

Board footer

Powered by FluxBB