Re: [gentoo-user] GBP character in KDE

2014-03-09 Thread Matti Nykyri
On Mar 8, 2014, at 20:44, Mick michaelkintz...@gmail.com wrote:

 On Saturday 08 Mar 2014 18:10:21 Mick wrote:
 On Saturday 08 Mar 2014 17:42:07 Pavel Volkov wrote:
 On Saturday 08 March 2014 15:50:27 Mick wrote:
 I can't understand why a PC that uses the KDE desktop always sticks an
 
 accented capital A in front of the pound sign.  It looks like this:
 £
 
 I don't have this problem in KDE (though I'm not using UK layout to type
 it). I use the additional X.Org layout called typo and type the pound
 sign with AltGr+F.
 
 What tool do you use to switch keyboard layouts and what are those
 layouts?
 
 This machine only has UK qwerty keyboard and UK locale.  I don't switch
 into any other layouts.
 
 I've just changed the default country in the KDE locale GUI from UK to 'No
 Country' and will restart the desktop as soon as I can kick a Luser off it,
 to see if it works.
 
 The user logged out of KDE and back in and the darn thing still shows up.  :-/
 
 Any ideas what might be causing this?  There is no problem with typing the US 
 dollar character key (Shift+4), but there is when pressing the GBP character 
 (Shift+3).
 
 This is what xev shows when pressing and releasing Shift plus the key:
 
 ==
 KeyPress event, serial 37, synthetic NO, window 0x4a1,
   root 0x15b, subw 0x4a2, time 125124784, (30,32), root:(3052,475),
   state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
   XLookupString gives 0 bytes: 
   XmbLookupString gives 0 bytes: 
   XFilterEvent returns: False
 
 KeyPress event, serial 40, synthetic NO, window 0x4a1,
   root 0x15b, subw 0x4a2, time 125128642, (30,32), root:(3052,475),
   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 40, synthetic NO, window 0x4a1,
   root 0x15b, subw 0x4a2, time 125128772, (30,32), root:(3052,475),
   state 0x11, keycode 12 (keysym 0xa3, sterling), same_screen YES,
   XLookupString gives 2 bytes: (c2 a3) £
   XFilterEvent returns: False
 
 KeyRelease event, serial 40, synthetic NO, window 0x4a1,
   root 0x15b, subw 0x4a2, time 125128977, (30,32), root:(3052,475),
   state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
   XLookupString gives 0 bytes: 
   XFilterEvent returns: False
 ==
 
 -- 
 Regards,
 Mick

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: £.

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.

When computer boots always starts with us layout and ascii map. It is upto your 
configuration to switch to your preferred layout and charmap.

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)

If that works you should have the right layout in kde. Deleting kde config will 
bring you the correct layout.

For the console set unicode aware font in conf.d/consolefont and keymap in 
keymaps. And in rc.conf set unicode to yes.

--
Matti



Re: [gentoo-user] GBP character in KDE

2014-03-09 Thread Stroller

On Sat, 8 March 2014, at 3:50 pm, Mick michaelkintz...@gmail.com wrote:
 ...
 This is what /etc/env.d/02locale contains:
 
 LANG=en_GB.UTF-8
 LC_COLLATE=C

Why have you set LC_COLLATE differently from LANG, please?

It's a couple of years since I messed with locale related stuff, but I 
understood that you weren't really supposed to set the categories separately.

Also, when testing I've found that changing locale and launching a new shell 
doesn't have the same effect as rebooting. Maybe there's something in the 
startup scripts, but I observed some unexpected behaviours if I didn't reboot.

Stroller.


Re: [gentoo-user] GBP character in KDE

2014-03-09 Thread Peter Humphrey
On Sunday 09 Mar 2014 14:48:45 Stroller wrote:
 On Sat, 8 March 2014, at 3:50 pm, Mick michaelkintz...@gmail.com wrote:
  ...
  This is what /etc/env.d/02locale contains:
  
  LANG=en_GB.UTF-8
  LC_COLLATE=C
 
 Why have you set LC_COLLATE differently from LANG, please?

See near the bottom of this page of the handbook:

http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1chap=6

Having said that, I find that my own 02locale says it's been generated 
automatically, and it omits the LC_COLLATE entry and I have no problem 
displaying pound signs:  £

-- 
Regards
Peter




Re: [gentoo-user] GBP character in KDE

2014-03-09 Thread Mick
On Sunday 09 Mar 2014 14:48:45 Stroller wrote:
 On Sat, 8 March 2014, at 3:50 pm, Mick michaelkintz...@gmail.com wrote:
  ...
  This is what /etc/env.d/02locale contains:
  
  LANG=en_GB.UTF-8
  LC_COLLATE=C
 
 Why have you set LC_COLLATE differently from LANG, please?

Because I am used to have files listed with . prefixed files first, then file 
names with Capital case and then lower case.  Otherwise if you have LC_ALL set 
then that setting will be followed for sorting files.  If neither LC_ALL nor 
LC_COLLATE are set, then LANG will take precedence.  Please note that I use 
different languages on a couple of machines and that can mess things up when 
listing stuff.

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] GBP character in KDE

2014-03-09 Thread Matti Nykyri
On Mar 9, 2014, at 18:26, Mick michaelkintz...@gmail.com wrote:

 On Sunday 09 Mar 2014 14:48:45 Stroller wrote:
 On Sat, 8 March 2014, at 3:50 pm, Mick michaelkintz...@gmail.com wrote:
 ...
 This is what /etc/env.d/02locale contains:
 
 LANG=en_GB.UTF-8
 LC_COLLATE=C
 
 Why have you set LC_COLLATE differently from LANG, please?
 
 Because I am used to have files listed with . prefixed files first, then file 
 names with Capital case and then lower case.  Otherwise if you have LC_ALL 
 set 
 then that setting will be followed for sorting files.  If neither LC_ALL nor 
 LC_COLLATE are set, then LANG will take precedence.  Please note that I use 
 different languages on a couple of machines and that can mess things up when 
 listing stuff.
 

Mick. Did you try this?

sudo Xorg :0 -ac -terminate  (sleep 4  DISPLAY=:0.0 xterm)

Is the problem also in a bare X session?

 -- 
 Regards,
 Mick



Re: [gentoo-user] GBP character in KDE

2014-03-09 Thread Mick
On Sunday 09 Mar 2014 09:00:23 Matti Nykyri wrote:
 On Mar 8, 2014, at 20:44, Mick michaelkintz...@gmail.com wrote:
  On Saturday 08 Mar 2014 18:10:21 Mick wrote:
  On Saturday 08 Mar 2014 17:42:07 Pavel Volkov wrote:
  On Saturday 08 March 2014 15:50:27 Mick wrote:
  I can't understand why a PC that uses the KDE desktop always sticks an
  
  accented capital A in front of the pound sign.  It looks like this:
  £
  
  I don't have this problem in KDE (though I'm not using UK layout to
  type it). I use the additional X.Org layout called typo and type the
  pound sign with AltGr+F.
  
  What tool do you use to switch keyboard layouts and what are those
  layouts?
  
  This machine only has UK qwerty keyboard and UK locale.  I don't switch
  into any other layouts.
  
  I've just changed the default country in the KDE locale GUI from UK to
  'No Country' and will restart the desktop as soon as I can kick a Luser
  off it, to see if it works.
  
  The user logged out of KDE and back in and the darn thing still shows up.
   :-/
  
  Any ideas what might be causing this?  There is no problem with typing
  the US dollar character key (Shift+4), but there is when pressing the
  GBP character (Shift+3).
  
  This is what xev shows when pressing and releasing Shift plus the key:
  
  ==
  KeyPress event, serial 37, synthetic NO, window 0x4a1,
  
root 0x15b, subw 0x4a2, time 125124784, (30,32), root:(3052,475),
state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
  
  KeyPress event, serial 40, synthetic NO, window 0x4a1,
  
root 0x15b, subw 0x4a2, time 125128642, (30,32), root:(3052,475),
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 40, synthetic NO, window 0x4a1,
  
root 0x15b, subw 0x4a2, time 125128772, (30,32), root:(3052,475),
state 0x11, keycode 12 (keysym 0xa3, sterling), same_screen YES,
XLookupString gives 2 bytes: (c2 a3) £
XFilterEvent returns: False
  
  KeyRelease event, serial 40, synthetic NO, window 0x4a1,
  
root 0x15b, subw 0x4a2, time 125128977, (30,32), root:(3052,475),
state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
  
  ==
 
 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: £.
 
 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.
 
 When computer boots always starts with us layout and ascii map. It is upto
 your configuration to switch to your preferred layout and charmap.
 
 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)
 
 If that works you should have the right layout in kde. Deleting kde config
 will bring you the correct layout.
 
 For the console set unicode aware font in conf.d/consolefont and keymap in
 keymaps. And in rc.conf set unicode to yes.

Thank you Matti!  I had some deprecated syntax in /etc/locale.gen and clearly 
my UTF8 local was not being generated.  As soon as I fixed that and rebooted I 
was able to type £ without  preceding it.

This is a rather old machine and I have not spent much time configuring it 
over the years.  It still has an old xorg.conf file which I will need to 
modify when I get a minute.

Thanks again for your help.  :-)

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


[gentoo-user] GBP character in KDE

2014-03-08 Thread Mick
I can't understand why a PC that uses the KDE desktop always sticks an 
accented capital A in front of the pound sign.  It looks like this:

 £

This is what /etc/env.d/02locale contains:

LANG=en_GB.UTF-8
LC_COLLATE=C

All KDE applications suffer from this affliction, as well as LibreOffice. 
However, for some reason Thunderbird does not.

Any idea how I can fix this?

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] GBP character in KDE

2014-03-08 Thread Pavel Volkov
On Saturday 08 March 2014 15:50:27 Mick wrote:
 I can't understand why a PC that uses the KDE desktop always sticks an
 accented capital A in front of the pound sign.  It looks like this:
 
  £

I don't have this problem in KDE (though I'm not using UK layout to type it).
I use the additional X.Org layout called typo and type the pound sign with 
AltGr+F.

What tool do you use to switch keyboard layouts and what are those layouts?



Re: [gentoo-user] GBP character in KDE

2014-03-08 Thread Mick
On Saturday 08 Mar 2014 17:42:07 Pavel Volkov wrote:
 On Saturday 08 March 2014 15:50:27 Mick wrote:
  I can't understand why a PC that uses the KDE desktop always sticks an
  
  accented capital A in front of the pound sign.  It looks like this:
   £
 
 I don't have this problem in KDE (though I'm not using UK layout to type
 it). I use the additional X.Org layout called typo and type the pound
 sign with AltGr+F.
 
 What tool do you use to switch keyboard layouts and what are those layouts?

This machine only has UK qwerty keyboard and UK locale.  I don't switch into 
any other layouts.

I've just changed the default country in the KDE locale GUI from UK to 'No 
Country' and will restart the desktop as soon as I can kick a Luser off it, to 
see if it works.

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] GBP character in KDE

2014-03-08 Thread Mick
On Saturday 08 Mar 2014 18:10:21 Mick wrote:
 On Saturday 08 Mar 2014 17:42:07 Pavel Volkov wrote:
  On Saturday 08 March 2014 15:50:27 Mick wrote:
   I can't understand why a PC that uses the KDE desktop always sticks an
   
   accented capital A in front of the pound sign.  It looks like this:
£
  
  I don't have this problem in KDE (though I'm not using UK layout to type
  it). I use the additional X.Org layout called typo and type the pound
  sign with AltGr+F.
  
  What tool do you use to switch keyboard layouts and what are those
  layouts?
 
 This machine only has UK qwerty keyboard and UK locale.  I don't switch
 into any other layouts.
 
 I've just changed the default country in the KDE locale GUI from UK to 'No
 Country' and will restart the desktop as soon as I can kick a Luser off it,
 to see if it works.

The user logged out of KDE and back in and the darn thing still shows up.  :-/

Any ideas what might be causing this?  There is no problem with typing the US 
dollar character key (Shift+4), but there is when pressing the GBP character 
(Shift+3).

This is what xev shows when pressing and releasing Shift plus the key:

==
KeyPress event, serial 37, synthetic NO, window 0x4a1,
root 0x15b, subw 0x4a2, time 125124784, (30,32), root:(3052,475),
state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x4a1,
root 0x15b, subw 0x4a2, time 125128642, (30,32), root:(3052,475),
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 40, synthetic NO, window 0x4a1,
root 0x15b, subw 0x4a2, time 125128772, (30,32), root:(3052,475),
state 0x11, keycode 12 (keysym 0xa3, sterling), same_screen YES,
XLookupString gives 2 bytes: (c2 a3) £
XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x4a1,
root 0x15b, subw 0x4a2, time 125128977, (30,32), root:(3052,475),
state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes: 
XFilterEvent returns: False
==

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.