nkf 1.6.2. looked at FreeBSD port, nothing to keep but the web address.

This commit is contained in:
espie 1998-11-25 16:39:59 +00:00
parent b826b02992
commit c684f5e589
7 changed files with 181 additions and 0 deletions

24
japanese/nkf/Makefile Normal file
View File

@ -0,0 +1,24 @@
# very loosely based on FreeBSD 2.2.7
# $OpenBSD: Makefile,v 1.1.1.1 1998/11/25 16:39:59 espie Exp $
DISTNAME= nkf-1.62
PKGNAME= ja-nkf-1.62
CATEGORIES= japanese textproc
MASTER_SITES= http://www.sfc.wide.ad.jp/~max/FreeBSD/ports/distfiles/
MAINTAINER= espie@openbsd.org
MAKEFILE=${FILESDIR}/Makefile
ALL_TARGET=nkf
# original english man page was rather difficult to follow
install:
${INSTALL_PROGRAM} ${WRKSRC}/nkf ${PREFIX}/bin
${INSTALL_MAN} ${FILESDIR}/nkf.1 ${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/nkf.doc ${PREFIX}/man/ja_JP.EUC/cat1/nkf.0
test: build
cd ${WRKSRC} && perl nkf_test.pl
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
# stub Makefile for nkf
nkf: nkf.c

1
japanese/nkf/files/md5 Normal file
View File

@ -0,0 +1 @@
MD5 (nkf-1.62.tar.gz) = dc718ce2be8da8f592b68fc024ab3ec1

131
japanese/nkf/files/nkf.1 Normal file
View File

@ -0,0 +1,131 @@
.\"
.Dd 20 Aug 96
.Dt NKF 1
.Sh NAME
.Nm nkf
.Nd Network Kanji code conversion Filter v1.6.2
.Sh SYNOPSIS
.Nm nkf
.Op Fl blrtTuvxXZ
.Op Fl ejs
.Op Fl BEJS
.Op Fl m Op Ar BQ
.Op Fl f Ar n
.Op Fl io Ar c
.Sh DESCRIPTION
.Nm Nkf
is yet another kanji encoding converter between networks, hosts and terminals.
It converts any input kanji encoding to a designated kanji encoding,
such as 7-bit JIS, MS-kanji (shifted-JIS) or EUC.
.Pp
One of the most unique features of
.Nm nkf
is the guess of the input kanji encoding.
It currently recognizes 7-bit JIS, MS-kanji (shifted-JIS) and EUC
automatically, so users don't need to know the kanji encoding used for input.
By default X0201 kana is converted into X0208 kana. For
X0201 kana, SO/SI, SSO and
ESC-(-I methods are supported. For automatic encoding detection,
.Nm nkf
assumes no X0201 kana in MS-Kanji. To accept X0201 in MS-Kanji, use
.Fl X ,
.Fl x
or
.Fl S .
.Pp
The following options are available:
.Bl -tag -width indent
.It Fl b
buffered output (default).
.It Fl u
unbuffered output.
.It Fl t
no operation.
.It Fl j
output 7-bit JIS code (default).
.It Fl s
output MS-kanji (shifted-JIS) code.
.It Fl e
output EUC (AT&T) code.
.It Fl i Ar c
output an
ESC $
.Ar c
sequence to designate JIS-kanji
(Default is B).
.It Fl o Ar c
output an
ESC (
.Ar c
sequence to designate single-byte roman characters
(Default is B).
.It Fl r
{de/en}crypt ROT13/47.
.It Fl v
display Version.
.It Fl T
Text mode output (MS-DOS).
.It Fl m
MIME ISO-2022-JP/ISO8859-1 decoding. To see ISO8859-1 (Latin-1)
.Fl l
is necessary.
.It Fl m Ar B
Decode MIME base64 encoded stream. Remove header or other parts before
conversion.
.It Fl m Ar Q
Decode MIME quoted stream. '_' inside quotes is converted to space.
.It Fl l
Input and output code is ISO8859-1 (Latin-1) and ISO-2022-JP.
.Fl s ,
.Fl e and
.Fl x
are not compatible with this option.
.It Fl f Ar n
Folding on length
.Ar n
in a line (default 60).
.It Fl X
Allow X0201 kana in MS-Kanji.
X0201 is converted into X0208 by default.
.It Fl x
Try to preseve X0208 kana.
Assume X0201 kana in MS-Kanji. And
do not convert X0201 kana to X0208.
In JIS output, ESC-(-I is used. In EUC output, SSO is used.
.It Fl Z
Convert X0208 alphabet to ASCII.
.It Fl S
Assume MS-Kanji and X0201 kana input. It also accepts JIS.
AT&T EUC is recognized as X0201 kana. Without the
.Fl x
flag, X0201 kana is converted into X0208.
.It Fl J
Assume JIS input. It also accepts Japanese EUC.
This is the default. This flag does not exclude MS-Kanji.
.It Fl E
Assume AT&T EUC input. It also accept JIS.
Same as
.Fl J ,
present for symetry.
.It Fl B
Assume broken JIS-Kanji, where ESC has been lost. Useful when your site is
using old B-News Nihongo patch.
.El
.Sh AUTHOR
Itaru Ichikawa <ichikawa@flab.fujitsu.co.jp>
.Sh EDITOR
a_kuroe@hoffman.cc.sophia.ac.jp (Akihiko Kuroe)
.Pp
kono@ie.u-ryukyu.ac.jp (Shinji KONO)
.Sh SEE ALSO
.%T "Understanding Japanese information processing"
by Ken Lunde (O'Reilly associates)
for a comprehensive description of japanese text encoding systems.
.Sh BUGS
.Nm Nkf
cannot handle some inputs that contain mixed kanji encoding.
.Pp
Automatic code detection
becomes very weak with \-x, \-X and \-S.

1
japanese/nkf/pkg/COMMENT Normal file
View File

@ -0,0 +1 @@
Network Kanji code conversion Filter

18
japanese/nkf/pkg/DESCR Normal file
View File

@ -0,0 +1,18 @@
Japanese character encodings are not very well standardized.
There are several distinct industrial standards.
JIS and EUC are the most common, they only use 7 bit characters and
state-shift sequences.
Shift-JIS (as known as Microsoft JIS) is a variant of JIS that use
8 bit characters instead of sequences to encode state-shift. It's a
broken scheme, as was to be expected.
All of this does NOT incorporate seemlessly into grander schemes such
as unicode yet...
Nkf is a tool to convert between all the commonest japanese encodings.
It is also able to repair documents which have lost part of their
escape sequences.
The niftiest feature of nkf is that it can guess input encodings, and
usually does this right.

3
japanese/nkf/pkg/PLIST Normal file
View File

@ -0,0 +1,3 @@
bin/nkf
man/man1/nkf.1
man/ja.JP_EUC/cat1/nkf.0