1 |
On Mar 8, 2014, at 20:44, Mick <michaelkintzios@×××××.com> wrote: |
2 |
|
3 |
> On Saturday 08 Mar 2014 18:10:21 Mick wrote: |
4 |
>> On Saturday 08 Mar 2014 17:42:07 Pavel Volkov wrote: |
5 |
>>> On Saturday 08 March 2014 15:50:27 Mick wrote: |
6 |
>>>> I can't understand why a PC that uses the KDE desktop always sticks an |
7 |
>>>> |
8 |
>>>> accented capital "A" in front of the pound sign. It looks like this: |
9 |
>>>> £ |
10 |
>>> |
11 |
>>> I don't have this problem in KDE (though I'm not using UK layout to type |
12 |
>>> it). I use the additional X.Org layout called "typo" and type the pound |
13 |
>>> sign with AltGr+F. |
14 |
>>> |
15 |
>>> What tool do you use to switch keyboard layouts and what are those |
16 |
>>> layouts? |
17 |
>> |
18 |
>> This machine only has UK qwerty keyboard and UK locale. I don't switch |
19 |
>> into any other layouts. |
20 |
>> |
21 |
>> I've just changed the default country in the KDE locale GUI from UK to 'No |
22 |
>> Country' and will restart the desktop as soon as I can kick a Luser off it, |
23 |
>> to see if it works. |
24 |
> |
25 |
> The user logged out of KDE and back in and the darn thing still shows up. :-/ |
26 |
> |
27 |
> Any ideas what might be causing this? There is no problem with typing the US |
28 |
> dollar character key (Shift+4), but there is when pressing the GBP character |
29 |
> (Shift+3). |
30 |
> |
31 |
> This is what xev shows when pressing and releasing Shift plus the key: |
32 |
> |
33 |
> ====================================================== |
34 |
> KeyPress event, serial 37, synthetic NO, window 0x4a00001, |
35 |
> root 0x15b, subw 0x4a00002, time 125124784, (30,32), root:(3052,475), |
36 |
> state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES, |
37 |
> XLookupString gives 0 bytes: |
38 |
> XmbLookupString gives 0 bytes: |
39 |
> XFilterEvent returns: False |
40 |
> |
41 |
> KeyPress event, serial 40, synthetic NO, window 0x4a00001, |
42 |
> root 0x15b, subw 0x4a00002, time 125128642, (30,32), root:(3052,475), |
43 |
> state 0x11, keycode 12 (keysym 0xa3, sterling), same_screen YES, |
44 |
> XLookupString gives 2 bytes: (c2 a3) "£" |
45 |
> XmbLookupString gives 2 bytes: (c2 a3) "£" |
46 |
> XFilterEvent returns: False |
47 |
> |
48 |
> KeyRelease event, serial 40, synthetic NO, window 0x4a00001, |
49 |
> root 0x15b, subw 0x4a00002, time 125128772, (30,32), root:(3052,475), |
50 |
> state 0x11, keycode 12 (keysym 0xa3, sterling), same_screen YES, |
51 |
> XLookupString gives 2 bytes: (c2 a3) "£" |
52 |
> XFilterEvent returns: False |
53 |
> |
54 |
> KeyRelease event, serial 40, synthetic NO, window 0x4a00001, |
55 |
> root 0x15b, subw 0x4a00002, time 125128977, (30,32), root:(3052,475), |
56 |
> state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES, |
57 |
> XLookupString gives 0 bytes: |
58 |
> XFilterEvent returns: False |
59 |
> ====================================================== |
60 |
> |
61 |
> -- |
62 |
> Regards, |
63 |
> Mick |
64 |
|
65 |
When you press £-symbol on your keyboard and are using a unicode keymap U+00A3 unicode keypoint is created. When that is encoded to UTF-8 a 2-byte string is created: 0x2CA3. Now when this string is displayed the software displaying the string needs to know the encoding of the string. If it is interpreted as UTF-8 string you will see: £. If it is interpreted as ISO-8859-1 or CP1252 these both will produce: £. |
66 |
|
67 |
So what this means is that you have an in correct unicode configuration. In the console I have correct unicode setup. How ever when run command unicode_stop I get £ and after I run unicode_start I will get £ as I should. |
68 |
|
69 |
When computer boots always starts with us layout and ascii map. It is upto your configuration to switch to your preferred layout and charmap. |
70 |
|
71 |
For X set your layout in xorg.conf.d in 10-evdev.conf (XkbLayout). Then test that X has the correct keyboard layout: sudo Xorg :0 -ac -terminate & (sleep 4 && DISPLAY=:0.0 xterm) |
72 |
|
73 |
If that works you should have the right layout in kde. Deleting kde config will bring you the correct layout. |
74 |
|
75 |
For the console set unicode aware font in conf.d/consolefont and keymap in keymaps. And in rc.conf set unicode to yes. |
76 |
|
77 |
-- |
78 |
Matti |