Bug 39849 - Problems with LESSCHARDEF, ~/.less, non-ASCII text
Summary: Problems with LESSCHARDEF, ~/.less, non-ASCII text
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: less
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Aaron Brown
Depends On:
TreeView+ depends on / blocked
Reported: 2001-05-09 11:20 UTC by John Smith
Modified: 2007-04-18 16:33 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2001-05-28 09:40:44 UTC

Attachments (Terms of Use)

Description John Smith 2001-05-09 11:20:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
The Japanese extension to less-358 has broken the program's handling of
non-ASCII "European" character sets. There are at least three problems,
none of which is found in the vanilla version of less-358.

1. The program checks the LESSCHARDEF environment variable to see if the
file is binary, but ignores it in displaying actual characters.

2. The program ignores line-edit literals specified in .less when these
invoke "high" characters (>127).

3. The program prefaces sequences of one or "high" characters with a
capital "A". This effect only appears on some terminal emulators (rxvt and

How reproducible:

Steps to Reproduce:
1.$ /usr/X11R6/bin/rxvt -fn 6x13 &
(In rxvt:)
2.$ export LESSCHARDEF=8bcccbcc18b95.b   # ASCII charset1
3.Create the following /tmp/lesskey file (the last char is Latin 1

\e[24~1 literal a
\e[24~2 literal `

4.$ /usr/bin/lesskey -o /tmp/less /tmp/lesskey
5.$ /usr/bin/less -k /tmp/less
6.Look for accented characters in the text
7.Press "/" to search, then F12, "1", F12, "2"

Actual Results:  The French accented characters appear normally, except
that each character or character-sequence is preceded by a "A".

The literal "a" is inserted into the search string, but the a-grave does
not appear.

Expected Results:  The French accented characters should be marked as
binary by the LESSCHARDEF setting and should therefore appear as
white-on-black hex sequences in angle brackets. When the characters do
appear, they should not be preceded by an "A" in rxvt. The a-grave should
be inserted into the search string in the same way as the "a".

Additional info:

Comment 1 Alex Kanavin 2001-05-12 12:51:51 UTC
This patch also breaks input of cyrillic characters (everywhere - in console,
xterm etc).
The patch is too big to dig into, so I think it's better to just exclude it from
non-Japanese versions of RHL.

Comment 2 Karsten Hopp 2001-06-25 11:17:45 UTC
Bug 1) and 3) are fixed in rawhide.
The maintainer has been notified about 2)

Note You need to log in before you can comment on or make changes to this bug.