No. 19/622 Index Prev Next
Relay-Version: version B 2.10.2 9/5/84; site titcca.UUCP
Posting-Version: version B 2.10.2 9/5/84; site ulisvax.UUCP
Path: titcca!ccut!ulisvax!kt
From: kt@ulisvax.UUCP (Kameyama Toyohisa)
Newsgroups: fj.wanted,fj.sources,fj.kanji
Subject: Re: why can't we read kanji in " less" ? (in English)
Message-ID: < 246@ulisvax.UUCP>
Date: 23 Apr 86 05:00:27 GMT
Date-Received: 23 Apr 86 07:35:13 GMT
References:
Distribution: fj
Organization: Univ of Lib & Info, Tukuba Japan
Lines: 185
Xref: ulisvax fj.wanted:16 fj.sources:30 fj.kanji:48
In article nojima@nttlab.ntt.junet writes:
> I installed and it works fine at our site. However, "less" won't
> accept Kanji. Has anybody tried it ? I think very simple hacking
> will improve the situation, but I knew almost nothing about C.
Here is another little hack result to less program. We can read
EUC (Extend Unix Code) and DEC KANJI code by the change.
By this hack, " less" don't convert control code, and 8-bit code
is accepted.
If internal kanji code is 8-bit JIS code, you will able to read
to change this article and in article
kato@cs.titech.junet write. And if internal code is shift-JIS code, you
must change this article cange and internal underline start/end code to
unused code in shift-JIS code. (but I can't know shift JIS code well)
However, it is NOT complete, also. The screen may be conterminate
(please redraw the screen).
Our site have mh.5 and rn accept EUC Kanji code. If you are interesting
this program, please mail kh@ulisvax.ulis.junet or kt@ulisvax.ulis.junet.
From Kameyamna Toyohisa
University of Library and Information Science
JUNET: kt@ulisvax.ulis.JUNET
UUCP: ..!titcca!ccut!ulis!ulisvax!kameyama
------------------- diff of ch.c -----------------
41a42,44
> #ifdef EUC
> extern int euc_use;
> #endif EUC
135a139,141
> #ifdef EUC
> if ((!clean_data)& & (!euc_use))
> #else EUC
136a143
> #endif EUC
------------------- diff of line.c -----------------
208a209
> #ifndef EUC
242a244
> #endif EUC
------------------- diff of option.c -----------------
40a41,43
> #ifdef EUC
> public int euc_use; /* Use Japanese character */
> #endif EUC
72a76,83
> #ifdef EUC
> { 'j', BOOL, 0, & euc_use,
> { "Don't use Japanese character",
> "Use Japanese character",
> NULL
> }
> },
> #endif EUC
------------------- diff of output.c -----------------
14a15,18
> #ifdef EUC
> extern int euc_use;
> extern int bs_mode;
> #endif EUC
56a61,67
> #ifdef EUC
> if(bs_mode == BS_CONTROL) {
> putc('^');
> putc('H');
> column+=2;
> } else
> #endif EUC
60a72,74
> #ifdef EUC
> if ((!euc_use)& & (c & 0200))
> #else EUC
61a76
> #endif EUC
65a81,87
> } else
> #ifdef EUC
> if ((!(c & 0200))& & control_char(c))
> {
> putc('^');
> putc(carat_char(c));
> column += 2;
66a89
> #endif EUC
From postnews Wed Apr 23 13:54:16 1986
Subject: Re: why can't we read kanji in " less" ? (in English)
Newsgroups: fj.wanted
Distribution: fj
References:
In article nojima@nttlab.ntt.junet writes:
> I installed and it works fine at our site. However, "less" won't
> accept Kanji. Has anybody tried it ? I think very simple hacking
> will improve the situation, but I knew almost nothing about C.
Here is another little hack result to less program. We can read
EUC (Extend Unix Code) and DEC KANJI code by the change.
By this hack, " less" don't convert control code, and 8-bit code
is accepted.
If internal kanji code is 8-bit JIS code, you will able to read
to change this article and in article
kato@cs.titech.junet write. And if internal code is shift-JIS code, you
must change this article cange and internal underline start/end code to
unused code in shift-JIS code. (but I can't know shift JIS code well)
However, it is NOT complete, also. The screen may be conterminate
(please redraw the screen).
Our site have mh.5 and rn accept EUC Kanji code. If you are interesting
this program, please mail kh@ulisvax.ulis.junet or kt@ulisvax.ulis.junet.
From Kameyamna Toyohisa
University of Library and Information Science
JUNET: kt@ulisvax.ulis.JUNET
UUCP: ..!titcca!ccut!ulis!ulisvax!kameyama
------------------- diff of ch.c -----------------
41a42,44
> #ifdef EUC
> extern int euc_use;
> #endif EUC
135a139,141
> #ifdef EUC
> if ((!clean_data)& & (!euc_use))
> #else EUC
136a143
> #endif EUC
------------------- diff of line.c -----------------
208a209
> #ifndef EUC
242a244
> #endif EUC
------------------- diff of option.c -----------------
40a41,43
> #ifdef EUC
> public int euc_use; /* Use Japanese character */
> #endif EUC
72a76,83
> #ifdef EUC
> { 'j', BOOL, 0, & euc_use,
> { "Don't use Japanese character",
> "Use Japanese character",
> NULL
> }
> },
> #endif EUC
------------------- diff of output.c -----------------
14a15,18
> #ifdef EUC
> extern int euc_use;
> extern int bs_mode;
> #endif EUC
56a61,67
> #ifdef EUC
> if(bs_mode == BS_CONTROL) {
> putc('^');
> putc('H');
> column+=2;
> } else
> #endif EUC
60a72,74
> #ifdef EUC
> if ((!euc_use)& & (c & 0200))
> #else EUC
61a76
> #endif EUC
65a81,87
> } else
> #ifdef EUC
> if ((!(c & 0200))& & control_char(c))
> {
> putc('^');
> putc(carat_char(c));
> column += 2;
66a89
> #endif EUC
Next
Continue