Bug 83377 - less(1) doesn't handle UTF-8
Summary: less(1) doesn't handle UTF-8
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: less
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-02-03 16:15 UTC by Tim Waugh
Modified: 2007-04-18 16:50 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-02-05 00:01:23 UTC
Embargoed:


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

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.



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