[blfs-support] problem using BS or DEL key

Ken Moffat zarniwhoop at ntlworld.com
Wed Dec 4 10:27:05 PST 2013


On Wed, Dec 04, 2013 at 01:11:00PM +0100, Alexey Orishko wrote:
> On Tue, Dec 3, 2013 at 10:53 PM, Ken Moffat <zarniwhoop at ntlworld.com> wrote:
> > On Tue, Dec 03, 2013 at 08:29:42PM +0000, Ken Moffat wrote:
> >>
> >>  What are the locales (LC_ALL or similar) in BOTH systems ?
> Neither has LC_ALL set
> 
> Ubuntu and LFS-7.4 had this set:
> LANG=en_US.UTF-8
> 
> My old LFS-6.3 has
> LANG=en_US.ISO-8859-1
> 

 Oh.  I had misunderstood that you were a norwegian.

 Anyway, you are using UTF-8 in both ubuntu and LFS-7.4.

> >>  Using 'showkey' [ in a tty ], find the values for the Backspace and
> >> Del keys - on a regular 102-key keyboard mine are 14 and 111 - then
> >> use 'dumpkeys | less' to find what is output for those keys - mine
> >> are 'Delete' and 'Remove' : for no-latin1 the latter is corrected in
> >> the patch.  I _think_ ubuntu has versions of both those commands
> >> (from console-tools), so you could compare them.
> On all systems showkey output is:
> BS - keycode  14 and DEL -keycode 111
> dumpkeys has 'Delete' and 'Remove'
> 

 So the keymap is ok.

> >  Also, check what you have in /etc/inputrc [ LFS section 7.14 ],
> content is exactly as in the book
>

 Good.
 
> After deeper investigation I got really confused....
> BS/DEL problem exists in en_US layout and appearing while I'm deleting
> SPACE symbol with BS within a string like "kkkkk kkkk".
> 
> I've changed LANG to LANG=en_US.ISO-8859-1 and UNICODE=0 and
> problem is still there, however on old LFS-6.3 everything works fine with
> LANG=en_US.ISO-8859-1 and even with "loadkeys no-latin1".
> 
> Problem looks like described in BLFS Chapter 2. Important Information,
> Locale Related Issues: "The Program Breaks Multibyte Characters or
> Doesn't Count Character Cells Correctly"
> 

 Using 8859-1 instead of unicode will cause the reverse of that
problem - any non-ASCII unicode text will probably be converted to
garbage, e.g. some common Norwegian letters -

 ae		æ
 o-slash	ø
 a-ring		å

> Since issue is present even with US keyboard layout, I wonder if ALFS
> build did something funny during build (or didn't do something right).
> 
> I've tried to rebuild kbd with a patch, but didn't help.
> 

 The patch fixed up the BS and DEL keycodes in the keymap, but your
problem is different.

> If I log via ssh everyhting looks ok. Is it because I use other pc
> facilities in this case?
> 
> /alexey

 You are using at least some of the settings from the machine where
you are typing, e.g. the font (whether in a tty or a desktop term)
comes from that machine.  I think you need to fix the problem on the
LFS machine - and then you might have to adjust the terminal or
environment on the other box where you use ssh.

 First, you have to make sure that your 7.4 system is correctly set
up for UTF-8.  Your ubuntu system appears to be ok for UTF-8 (as
expected), your antiquated LFS-6.3 is a historical curiosity from
the days before UTF-8 was the norm.

 In my previous reply I included an invalid-unicode symbol, code
U+FFFD displaying as reverse-video question mark : � : if you read
the mail on the LFS-7.4 machine (or copy this paragraph to a file,
scp that file to the LFS machine, and then read it), does the
resulting glyph appear correctly, and if not, does it match the
white squares you had [ you need to revert the LANG and UNICODE
settings ] ?

 There are (at least) three things to be done when moving from
non-unicode to unicode:

(i.) set the environment to use the unicode versions such as
en_US.UTF-8.

(ii.) use a unicode console font.

(iii.) adjust environment or other settings for individual
applications, e.g. in the distant past I used to use LESSCHARSET but
that is now redundant.

 I now wonder if you are using a non-unicode console font ?

ĸen
-- 
das eine Mal als Tragödie, dieses Mal als Farce



More information about the blfs-support mailing list