Red Hat Bugzilla – Bug 39849
Problems with LESSCHARDEF, ~/.less, non-ASCII text
Last modified: 2007-04-18 12:33:09 EDT
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
Steps to Reproduce:
1.$ /usr/X11R6/bin/rxvt -fn 6x13 &
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
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".
This patch also breaks input of cyrillic characters (everywhere - in console,
The patch is too big to dig into, so I think it's better to just exclude it from
non-Japanese versions of RHL.
Bug 1) and 3) are fixed in rawhide.
The maintainer has been notified about 2)