Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ kconv(1) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

kcode(1)

fkconv(3K)

fkcode(3K)

kconv(1)                          2/4/92                           kconv(1)

NAME
     kconv - kanji code converter

SYNOPSIS
     kconv [-q] [-e] [-a] [-l limit] [-i ifmt] [-o ofmt] [-f outfile] [file]

DESCRIPTION
     kconv handles arbitrary conversions between EUC, Shift-JIS,  JIS,  Old
     JIS  and  NEC-JIS  encoded  text.  The command supports all characters
     defined  in  JIS X 0208-1990,  as  well  as  EUC   codeset 3   (gaiji)
     characters.

     By default, the input text  in  file  is  converted  to  EUC  (without
     expanding  half-size  katakana)  and written to stdout. If file is not
     specified, input is taken from stdin. The encoding of the  input  file
     is detected automatically (see NOTES below).

OPTIONS
     -o ofmt
          Set the output format to ofmt. Valid formats are:

               jis    - (New) JIS
               ojis   - Old JIS
               njis   - NEC-JIS
               sjis   - Shift-JIS
               euc    - Extended UNIX Code (default)

     -i ifmt
          Set the input format  to  ifmt.  The  same  values  of  ifmt  are
          recognized as for the -o option (see NOTES below).

     -f outfile
          Write output to outfile instead of stdout.  The  output  file  is
          created or truncated as necessary.

     -e   Half-size katakana in the input are converted to their  full-size
          equivalents. This option is always in effect if the output format
          is one of the 7-bit codes.

     -a   Shift out to ASCII instead of  JIS-Roman.  Some  terminals  which
          lack  the  JIS-Roman  extended character set do not recognize the
          default shift-out sequence  to  JIS-Roman.  Setting  this  option
          causes  kconv  to generate a shift-out sequence to ASCII instead.
          The -a option is ignored if ofmt is not jis or ojis.

     -l limit
          Limit  the  amount  of  lookahead  for  automatic  input   format
          detection to at most limit bytes.

     -q   Suppress non-fatal messages.





Page 1                       Reliant UNIX 5.44                       2, 194

kconv(1)                          2/4/92                           kconv(1)

NOTES
     If the -i option is not used, and input is read from a pipe or device,
     the  automatic  input  detection  saves  all  characters read for that
     purpose in  a  temporary  file.  The  amount  of  text  saved  may  be
     everything  up  to  EOF. If kconv is used as a non-interactive filter,
     either the input type should be specified with the -i option,  or  the
     amount  of  lookahead  should  be limited with the -l option, to avoid
     writing excessively large temporary files.

DIAGNOSTICS
     Exit status is normally 0. Errors return an  exit  status  of  99  and
     print  a  diagnostic on stderr. Non-fatal errors return an exit status
     of 1 and print a diagnostic on stderr, unless the -q option is set.

     Input format unknown - no conversion done
          The input file is not in any recognized  format  and  was  copied
          through unchanged (non-fatal error).

     Identity conversion: ifmt to ofmt
          Input and output format types are identical,  and  the  -e option
          was  not  set. The input file is copied through unchanged in this
          case (non-fatal error).

     Suspect characters in input, check output file contents
          An invalid byte sequence was  detected  during  conversion.  This
          indicates   that   the   input  file  contains  incomplete  kanji
          characters, partial escape sequences,  or  byte  sequences  who's
          value  does  not  map  into a kanji character. This diagnostic is
          also produced if the input file contains  EUC  codeset 3  (gaiji)
          characters,  and ofmt is not euc, or if ofmt is ojis or njis, and
          the input  file  contains  one  of  the  six  kanji  appended  to
          JIS X 0208 in 1983 and 1990 (non-fatal error).

     EUC/Shift-JIS ambiguity: use -i option
          The  automatic  input  format  detection  could  not  distinguish
          between  EUC and Shift-JIS. The -i option must be used to set the
          appropriate input format explicitly.

BUGS
     The automatic input format detection cannot always distinguish between
     EUC and Shift-JIS. This most commonly happens when the input file only
     contains half-size katakana. The -i option must be  used  to  set  the
     input format in these cases.

ENVIRONMENT
     TMPDIR
          Directory  for  temporary  file  created   by   automatic   input
          detection.  A  temporary file is written only if the -i option is
          not used, and the input file is not a regular file  or  input  is
          read from a pipe.




Page 2                       Reliant UNIX 5.44                       2, 194

kconv(1)                          2/4/92                           kconv(1)

SEE ALSO
     kcode(1), fkconv(3K), fkcode(3K).




















































Page 3                       Reliant UNIX 5.44                       2, 194

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026