Bug 65203 - less is broken for Japanese
Summary: less is broken for Japanese
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: less   
(Show other bugs)
Version: 7.3
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Aaron Brown
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-20 07:55 UTC by Nakai
Modified: 2007-04-18 16:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-05-20 09:12:57 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
'ABC' file in Japanese multibyte. (7 bytes, patch)
2002-05-20 07:56 UTC, Nakai
no flags Details | Diff
It should be like this on kterm (1.07 KB, image/png)
2002-05-20 08:00 UTC, Nakai
no flags Details
less-358+iso247-20001210-rh.diff (Updated iso patch for less) (283.92 KB, patch)
2002-05-20 09:12 UTC, Nakai
no flags Details | Diff

Description Nakai 2002-05-20 07:55:50 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.0 (X11; Linux i686; U;) Gecko/20020408

Description of problem:
less is broken for Japanese.
The attached file should be seen as the attached png in
Japanese mode. (LANG=ja_JP.eucJP, JLESSCHARSET=japanese)

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


How reproducible:
Always

Steps to Reproduce:
1. less the attached file.
2. Oops.
3. Do you say we need to use emacs instead of less? RHL7.2 was better..
	

Actual Results:  Broken - it shows hex dump.

Expected Results:  Human readable.

Additional info:

Comment 1 Nakai 2002-05-20 07:56:50 UTC
Created attachment 57964 [details]
'ABC' file in Japanese multibyte.

Comment 2 Nakai 2002-05-20 08:00:05 UTC
Created attachment 57965 [details]
It should be like this on kterm

Comment 3 Nakai 2002-05-20 09:01:26 UTC
I understand this iso patch breaks -N option for Japanese and other
languages. And I found a mistake in the patch. The patch author
added a line but forget to add {} to the for sentence. Below change
fixed the problem.

--- less-358/line.c.orig        Mon May 20 18:02:51 2002
+++ less-358/line.c     Mon May 20 18:03:06 2002
@@ -152,9 +152,10 @@
        {
                sprintf(&linebuf[curr], "%*d", LINENUM_WIDTH, lno);
                column += LINENUM_WIDTH;
-               for (i = 0;  i < LINENUM_WIDTH;  i++)
+               for (i = 0;  i < LINENUM_WIDTH;  i++) {
                        charset[curr] = ASCII;
                        attr[curr++] = AT_NORMAL;
+               }
        }
        /*
         * Append enough spaces to bring us to the lmargin.


Comment 4 Nakai 2002-05-20 09:12:14 UTC
Created attachment 57984 [details]
less-358+iso247-20001210-rh.diff (Updated iso patch for less)

Comment 5 Nakai 2002-05-20 09:12:51 UTC
Updated iso patch attached.

Comment 6 Karsten Hopp 2002-06-18 23:26:49 UTC
fixed in less-358-27 with iso254  and other patches


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