Bug 83377 - less(1) doesn't handle UTF-8
less(1) doesn't handle UTF-8
Status: CLOSED CURRENTRELEASE
Product: Red Hat Raw Hide
Classification: Retired
Component: less (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-03 11:15 EST by Tim Waugh
Modified: 2007-04-18 12:50 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-04 19:01:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
less-378-multibyte.patch (1.64 KB, patch)
2003-02-03 12:57 EST, Tim Waugh
no flags Details | Diff
Test to test UTF-8 (13.71 KB, text/plain)
2003-02-05 13:01 EST, Charles Lopes
no flags Details

  None (edit)
Description Tim Waugh 2003-02-03 11:15:04 EST
Description of problem:
less doesn't correctly handle underlined UTF-8.

Version-Release number of selected component (if applicable):
less-378-5

How reproducible:
100%

Steps to Reproduce:
1. Start gnome-terminal.
2. echo -ne '\137\010\342\200\220\012' | less

Actual results:
??? (first '?' underlined)

Expected results:
- (underlined)

Additional info:
Seems to have the same cause as bug #83376.
Comment 1 Tim Waugh 2003-02-03 12:57:16 EST
Created attachment 89807 [details]
less-378-multibyte.patch

This patch fixes it for me.
Comment 2 Tim Waugh 2003-02-03 13:19:18 EST
Fixed package is 378-6.
Comment 3 Charles Lopes 2003-02-05 13:01:15 EST
Created attachment 89869 [details]
Test to test UTF-8

Sorry but UTF-8 is still broken. less-378+iso247-20030108.diff is the reason
why it is broken. Quite frankly, this is a patch that makes quite a few
assumptions on how multibyte scripts work and probably breaks other non CJK
centric multibyte encodings. There used to be a patch for less to support CJK.
The authors had given up the idea of supporting non ISO2022 scripts and thus
the compiled patched less was called jless so that it could coexist alongside
plain vanilla less, letting the user choose to use one or the other. If this is
the same patch or a derivatif of it that you are using I would advise you to
just drop it or create a jless package.
Try reading the attached file to convince you how much less is broken. It works
fine with the forementioned patch.
Another possible test: read a man page in an xterm. "man man" is a good example
:-)
Comment 4 Tim Waugh 2003-02-05 13:02:45 EST
less-378-7 is the real fix.  Part of the patch was missing.
Comment 5 Miloslav Trmac 2004-02-04 19:01:23 EST
Fix confirmed in less-378-11.1.

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