Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 83377

Summary: less(1) doesn't handle UTF-8
Product: [Retired] Red Hat Raw Hide Reporter: Tim Waugh <twaugh>
Component: lessAssignee: Tim Waugh <twaugh>
Status: CLOSED CURRENTRELEASE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-02-05 00:01:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
less-378-multibyte.patch
none
Test to test UTF-8 none

Description Tim Waugh 2003-02-03 16:15:04 UTC
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 17:57:16 UTC
Created attachment 89807 [details]
less-378-multibyte.patch

This patch fixes it for me.

Comment 2 Tim Waugh 2003-02-03 18:19:18 UTC
Fixed package is 378-6.

Comment 3 Charles Lopes 2003-02-05 18:01:15 UTC
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 18:02:45 UTC
less-378-7 is the real fix.  Part of the patch was missing.

Comment 5 Miloslav Trmac 2004-02-05 00:01:23 UTC
Fix confirmed in less-378-11.1.