public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] GBP character in KDE
@ 2014-03-08 15:50 Mick
  2014-03-08 17:42 ` Pavel Volkov
  2014-03-09 14:48 ` Stroller
  0 siblings, 2 replies; 10+ messages in thread
From: Mick @ 2014-03-08 15:50 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: Text/Plain, Size: 418 bytes --]

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] GBP character in KDE
  2014-03-08 15:50 [gentoo-user] GBP character in KDE Mick
@ 2014-03-08 17:42 ` Pavel Volkov
  2014-03-08 18:10   ` Mick
  2014-03-09 14:48 ` Stroller
  1 sibling, 1 reply; 10+ messages in thread
From: Pavel Volkov @ 2014-03-08 17:42 UTC (permalink / raw
  To: gentoo-user

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?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] GBP character in KDE
  2014-03-08 17:42 ` Pavel Volkov
@ 2014-03-08 18:10   ` Mick
  2014-03-08 18:44     ` Mick
  0 siblings, 1 reply; 10+ messages in thread
From: Mick @ 2014-03-08 18:10 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: Text/Plain, Size: 834 bytes --]

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] GBP character in KDE
  2014-03-08 18:10   ` Mick
@ 2014-03-08 18:44     ` Mick
  2014-03-09  9:00       ` Matti Nykyri
  0 siblings, 1 reply; 10+ messages in thread
From: Mick @ 2014-03-08 18:44 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: Text/Plain, Size: 2577 bytes --]

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 0x4a00001,
    root 0x15b, subw 0x4a00002, 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 0x4a00001,
    root 0x15b, subw 0x4a00002, 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 0x4a00001,
    root 0x15b, subw 0x4a00002, 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 0x4a00001,
    root 0x15b, subw 0x4a00002, 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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] GBP character in KDE
  2014-03-08 18:44     ` Mick
@ 2014-03-09  9:00       ` Matti Nykyri
  2014-03-09 17:14         ` Mick
  0 siblings, 1 reply; 10+ messages in thread
From: Matti Nykyri @ 2014-03-09  9:00 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

[-- Attachment #1: Type: text/plain, Size: 3920 bytes --]

On Mar 8, 2014, at 20:44, Mick <michaelkintzios@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 0x4a00001,
>   root 0x15b, subw 0x4a00002, 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 0x4a00001,
>   root 0x15b, subw 0x4a00002, 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 0x4a00001,
>   root 0x15b, subw 0x4a00002, 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 0x4a00001,
>   root 0x15b, subw 0x4a00002, 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


[-- Attachment #2: Type: text/html, Size: 12989 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] GBP character in KDE
  2014-03-08 15:50 [gentoo-user] GBP character in KDE Mick
  2014-03-08 17:42 ` Pavel Volkov
@ 2014-03-09 14:48 ` Stroller
  2014-03-09 16:25   ` Peter Humphrey
  2014-03-09 16:26   ` Mick
  1 sibling, 2 replies; 10+ messages in thread
From: Stroller @ 2014-03-09 14:48 UTC (permalink / raw
  To: gentoo-user


On Sat, 8 March 2014, at 3:50 pm, Mick <michaelkintzios@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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] GBP character in KDE
  2014-03-09 14:48 ` Stroller
@ 2014-03-09 16:25   ` Peter Humphrey
  2014-03-09 16:26   ` Mick
  1 sibling, 0 replies; 10+ messages in thread
From: Peter Humphrey @ 2014-03-09 16:25 UTC (permalink / raw
  To: gentoo-user

On Sunday 09 Mar 2014 14:48:45 Stroller wrote:
> On Sat, 8 March 2014, at 3:50 pm, Mick <michaelkintzios@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=1&chap=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



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] GBP character in KDE
  2014-03-09 14:48 ` Stroller
  2014-03-09 16:25   ` Peter Humphrey
@ 2014-03-09 16:26   ` Mick
  2014-03-09 16:53     ` Matti Nykyri
  1 sibling, 1 reply; 10+ messages in thread
From: Mick @ 2014-03-09 16:26 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: Text/Plain, Size: 736 bytes --]

On Sunday 09 Mar 2014 14:48:45 Stroller wrote:
> On Sat, 8 March 2014, at 3:50 pm, Mick <michaelkintzios@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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] GBP character in KDE
  2014-03-09 16:26   ` Mick
@ 2014-03-09 16:53     ` Matti Nykyri
  0 siblings, 0 replies; 10+ messages in thread
From: Matti Nykyri @ 2014-03-09 16:53 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

On Mar 9, 2014, at 18:26, Mick <michaelkintzios@gmail.com> wrote:

> On Sunday 09 Mar 2014 14:48:45 Stroller wrote:
>> On Sat, 8 March 2014, at 3:50 pm, Mick <michaelkintzios@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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] GBP character in KDE
  2014-03-09  9:00       ` Matti Nykyri
@ 2014-03-09 17:14         ` Mick
  0 siblings, 0 replies; 10+ messages in thread
From: Mick @ 2014-03-09 17:14 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: Text/Plain, Size: 4584 bytes --]

On Sunday 09 Mar 2014 09:00:23 Matti Nykyri wrote:
> On Mar 8, 2014, at 20:44, Mick <michaelkintzios@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 0x4a00001,
> > 
> >   root 0x15b, subw 0x4a00002, 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 0x4a00001,
> > 
> >   root 0x15b, subw 0x4a00002, 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 0x4a00001,
> > 
> >   root 0x15b, subw 0x4a00002, 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 0x4a00001,
> > 
> >   root 0x15b, subw 0x4a00002, 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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-03-09 17:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-08 15:50 [gentoo-user] GBP character in KDE Mick
2014-03-08 17:42 ` Pavel Volkov
2014-03-08 18:10   ` Mick
2014-03-08 18:44     ` Mick
2014-03-09  9:00       ` Matti Nykyri
2014-03-09 17:14         ` Mick
2014-03-09 14:48 ` Stroller
2014-03-09 16:25   ` Peter Humphrey
2014-03-09 16:26   ` Mick
2014-03-09 16:53     ` Matti Nykyri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox