OSDN Git Service

Initial revision
authorShinji Kono <shinji_kono@users.sourceforge.jp>
Thu, 26 Sep 2002 23:05:30 +0000 (23:05 +0000)
committerShinji Kono <shinji_kono@users.sourceforge.jp>
Thu, 26 Sep 2002 23:05:30 +0000 (23:05 +0000)
18 files changed:
MANIFEST [new file with mode: 0644]
Makefile [new file with mode: 0644]
NKF.mod/Changes [new file with mode: 0644]
NKF.mod/MANIFEST [new file with mode: 0644]
NKF.mod/Makefile.PL [new file with mode: 0644]
NKF.mod/NKF.pm [new file with mode: 0644]
NKF.mod/NKF.xs [new file with mode: 0644]
NKF.mod/README [new file with mode: 0644]
NKF.mod/test.pl [new file with mode: 0644]
config.h [new file with mode: 0644]
nkf.1 [new file with mode: 0644]
nkf.1j [new file with mode: 0644]
nkf.c [new file with mode: 0644]
nkf.doc [new file with mode: 0644]
nkf_test.pl [new file with mode: 0644]
nkf_utf8.txt [new file with mode: 0644]
test.pl [new file with mode: 0644]
utf8tbl.c [new file with mode: 0644]

diff --git a/MANIFEST b/MANIFEST
new file mode 100644 (file)
index 0000000..fa176a6
--- /dev/null
+++ b/MANIFEST
@@ -0,0 +1,20 @@
+MANIFEST
+INSTALL.j
+INSTALL
+Makefile
+config.h
+make_test.pl
+nkf.1
+nkf.1j
+nkf.c
+nkf.doc
+nkf_test.pl
+test.pl
+utf8tbl.c
+NKF.mod/Changes
+NKF.mod/MANIFEST
+NKF.mod/Makefile.PL
+NKF.mod/NKF.pm
+NKF.mod/NKF.xs
+NKF.mod/README
+NKF.mod/test.pl
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..d8f0727
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,40 @@
+CC = cc
+CFLAGS = -O
+# CFLAGS = -O3
+SHAR = shar 
+# SHAR = shar -T
+PERL = perl
+RM = rm -rf
+VERSION = 201
+
+nkf : nkf.c config.h utf8tbl.o
+       $(CC) $(CFLAGS) -o nkf nkf.c utf8tbl.o
+
+utf8tbl.o : utf8tbl.c config.h
+       $(CC) $(CFLAGS) -c utf8tbl.c
+
+clean:
+       -$(RM) nkf.o nkf nkf.in nkf.out nkf$(VERSION) *~ *.bad utf8tbl.o
+       cd NKF.mod; make clean
+test:  nkf
+       $(PERL) test.pl
+
+perl:
+       ( cd NKF.mod ; \
+       $(PERL) Makefile.PL  ; \
+       make ; \
+       make test )
+
+shar:
+       -mkdir nkf$(VERSION)
+       -mkdir nkf$(VERSION)/NKF.mod
+       for file in  `cat MANIFEST`;  \
+       do  \
+           nkf -j -m0 $$file > nkf$(VERSION)/$$file ; \
+       done 
+       echo "#!/bin/sh" >nkf$(VERSION).shar
+       echo "mkdir nkf$(VERSION)" >>nkf$(VERSION).shar
+       echo "mkdir nkf$(VERSION)/NKF.mod" >>nkf$(VERSION).shar
+       echo "cd nkf$(VERSION)" >>nkf$(VERSION).shar
+       ( cd nkf$(VERSION) ; $(SHAR)  `cat ../MANIFEST` ) >> nkf$(VERSION).shar
+       -$(RM) nkf$(VERSION)
diff --git a/NKF.mod/Changes b/NKF.mod/Changes
new file mode 100644 (file)
index 0000000..77e3530
--- /dev/null
@@ -0,0 +1,5 @@
+Revision history for Perl extension NKF.
+
+1.7  Sat Nov  7 16:50:33 1998
+       - original version; created by h2xs 1.18
+
diff --git a/NKF.mod/MANIFEST b/NKF.mod/MANIFEST
new file mode 100644 (file)
index 0000000..7600ec4
--- /dev/null
@@ -0,0 +1,6 @@
+Changes
+MANIFEST
+Makefile.PL
+NKF.pm
+NKF.xs
+test.pl
diff --git a/NKF.mod/Makefile.PL b/NKF.mod/Makefile.PL
new file mode 100644 (file)
index 0000000..34202b6
--- /dev/null
@@ -0,0 +1,18 @@
+use ExtUtils::MakeMaker;
+# See lib/ExtUtils/MakeMaker.pm for details of how to influence
+# the contents of the Makefile that is written.
+WriteMakefile(
+    'NAME'     => 'NKF',
+    'VERSION_FROM' => 'NKF.pm', # finds $VERSION
+    'LIBS'     => [''],   # e.g., '-lm' 
+    'DEFINE'   => '',     # e.g., '-DHAVE_SOMETHING' 
+    'INC'      => '',     # e.g., '-I/usr/include/other' 
+    'INC'      => '',     # e.g., '-I/usr/include/other' 
+);
+
+sub MM::postamble {
+          '
+NKF.c: ../nkf.c ../utf8tbl.c
+';
+}
+
diff --git a/NKF.mod/NKF.pm b/NKF.mod/NKF.pm
new file mode 100644 (file)
index 0000000..1912169
--- /dev/null
@@ -0,0 +1,134 @@
+## Copyright (C) 1996,1998
+## Copyright (C) 2002
+## Ï¢ÍíÀ衧 Î°µåÂç³Ø¾ðÊ󹩳زʠ²ÏÌî ¿¿¼£  mime/X0208 support
+## ¡ÊE-Mail Address: kono@ie.u-ryukyu.ac.jp¡Ë
+## Ï¢ÍíÀ衧 COW for DOS & Win16 & Win32 & OS/2
+## ¡ÊE-Mail Address: GHG00637@niftyserve.or.p¡Ë
+##    
+##    ¤³¤Î¥½¡¼¥¹¤Î¤¤¤«¤Ê¤ëÊ£¼Ì¡¤²þÊÑ¡¤½¤Àµ¤âµöÂú¤·¤Þ¤¹¡£¤¿¤À¤·¡¢
+##    ¤½¤ÎºÝ¤Ë¤Ï¡¢Ã¯¤¬¹×¸¥¤·¤¿¤ò¼¨¤¹¤³¤ÎÉôʬ¤ò»Ä¤¹¤³¤È¡£
+##    ºÆÇÛÉۤ仨»ï¤ÎÉÕÏ¿¤Ê¤É¤ÎÌ䤤¹ç¤ï¤»¤âɬÍפ¢¤ê¤Þ¤»¤ó¡£
+##    ±ÄÍøÍøÍѤâ¾åµ­¤ËÈ¿¤·¤Ê¤¤ÈϰϤǵö²Ä¤·¤Þ¤¹¡£
+##    ¥Ð¥¤¥Ê¥ê¤ÎÇÛÉۤκݤˤÏversion message¤òÊݸ¤¹¤ë¤³¤È¤ò¾ò·ï¤È¤·¤Þ¤¹¡£
+##    ¤³¤Î¥×¥í¥°¥é¥à¤Ë¤Ä¤¤¤Æ¤ÏÆä˲¿¤ÎÊݾڤ⤷¤Ê¤¤¡¢°­¤·¤«¤é¤º¡£
+##    
+##    Everyone is permitted to do anything on this program
+##    including copying, modifying, improving, 
+##    as long as you don't try to pretend that you wrote it.
+##    i.e., the above copyright notice has to appear in all copies.  
+##    Binar y distribution requires original version messages.
+##    You don't have to ask before copying, redistribution or publishing.
+##    THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE.
+
+
+package NKF;
+
+use strict;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
+
+require Exporter;
+require DynaLoader;
+
+@ISA = qw(Exporter DynaLoader);
+# Items to export into callers namespace by default. Note: do not export
+# names by default without a very good reason. Use EXPORT_OK instead.
+# Do not simply export all your public functions/methods/constants.
+@EXPORT = qw(
+       nkf     
+);
+$VERSION = '2.00';
+
+bootstrap NKF $VERSION;
+
+# Preloaded methods go here.
+
+# Autoload methods go after =cut, and are processed by the autosplit program.
+
+1;
+__END__
+# Below is the stub of documentation for your module. You better edit it!
+
+=head1 NAME
+
+NKF - Perl extension for Network Kanji Filter 
+
+=head1 SYNOPSIS
+
+  use NKF;
+  $output = nkf("-s",$input);
+
+=head1 DESCRIPTION
+
+This is a Perl Extension version of nkf (Netowrk Kanji Filter ) 1.7.
+It converts the last argument and return converted result. Conversion
+details are specified by flags before the last argument.
+
+Flags:
+
+C<b,u      Output is bufferred (DEFAULT),Output is unbufferred>
+
+C<j,s,e    Outout code is JIS 7 bit (DEFAULT), Shift JIS, AT&T JIS (EUC)>
+
+C<J,S,E    Input assumption is JIS 7 bit , Shift JIS, AT&T JIS (EUC)>
+
+C<t        no conversion>
+
+C<i_       Output sequence to designate JIS-kanji (DEFAULT B)>
+
+C<o_       Output sequence to designate ASCII (DEFAULT B)>
+
+C<r        {de/en}crypt ROT13/47>
+
+C<m[BQ]    MIME decode [B:base64 stream,Q:quoted stream]>
+
+C<l        ISO8859-1 (Latin-1) support>
+
+C<f        Folding: C<-f60> or C<-f>>
+
+C<Z[0-2]   Convert X0208 alphabet to ASCII  1: Kankaku to space,2: 2 spaces>
+
+C<X,x      Assume X0201 kana in MS-Kanji, C<-x> preserves X0201>
+
+C<B[0-2]   Broken input  0: missing ESC,1: any X on ESC-[($]-X,2: ASCII on NL>
+
+C<d,c      Delete \r in line feed, Add \r in line feed>
+
+
+C<m0 No MIME decode.>
+
+C<M MIME encode. Header style. All ASCII code and control characters are intact.>
+
+C<MB MIME encode.  Base64 stream. Kanji conversion is performed before encoding, so this cannot be used as a picture encoder.>
+
+C<l Input and output code is ISO8859-1 (Latin-1) and ISO-2022-JP.>
+
+C<L[wmu] new line mode>
+
+C<    -Lu   unix (LF) >
+
+C<    -Lw   windows (CRLF) >
+
+C<    -Lm   mac (CR) >
+
+C< --fj,--unix,--mac,--msdos, --windows convert for these system>
+
+C< --jis,--euc,--sjis,--mime,--base64  convert for named code>
+
+C< --jis-input,--euc-input,--sjis-input,--mime-input,--base64-input assume input system>
+
+C< -- ignore rest of -option>
+
+C< --help>
+
+C< --version>
+
+=head1 AUTHOR
+
+Network Kanji Filter Version 1.9 (2/0002/Shinji Kono) 
+Copyright (C) 1987, FUJITSU LTD. (I.Ichikawa),1998 S. Kono, COW
+
+=head1 SEE ALSO
+
+perl(1).   nkf(1)
+
+=cut
diff --git a/NKF.mod/NKF.xs b/NKF.mod/NKF.xs
new file mode 100644 (file)
index 0000000..650cfa5
--- /dev/null
@@ -0,0 +1,168 @@
+/***********************************************************************
+** Copyright (C) 1996,1998
+** Copyright (C) 2002
+** Ï¢ÍíÀ衧 Î°µåÂç³Ø¾ðÊ󹩳زʠ²ÏÌî ¿¿¼£  mime/X0208 support
+** ¡ÊE-Mail Address: kono@ie.u-ryukyu.ac.jp¡Ë
+** Ï¢ÍíÀ衧 COW for DOS & Win16 & Win32 & OS/2
+** ¡ÊE-Mail Address: GHG00637@niftyserve.or.p¡Ë
+**    
+**    ¤³¤Î¥½¡¼¥¹¤Î¤¤¤«¤Ê¤ëÊ£¼Ì¡¤²þÊÑ¡¤½¤Àµ¤âµöÂú¤·¤Þ¤¹¡£¤¿¤À¤·¡¢
+**    ¤½¤ÎºÝ¤Ë¤Ï¡¢Ã¯¤¬¹×¸¥¤·¤¿¤ò¼¨¤¹¤³¤ÎÉôʬ¤ò»Ä¤¹¤³¤È¡£
+**    ºÆÇÛÉۤ仨»ï¤ÎÉÕÏ¿¤Ê¤É¤ÎÌ䤤¹ç¤ï¤»¤âɬÍפ¢¤ê¤Þ¤»¤ó¡£
+**    ±ÄÍøÍøÍѤâ¾åµ­¤ËÈ¿¤·¤Ê¤¤ÈϰϤǵö²Ä¤·¤Þ¤¹¡£
+**    ¥Ð¥¤¥Ê¥ê¤ÎÇÛÉۤκݤˤÏversion message¤òÊݸ¤¹¤ë¤³¤È¤ò¾ò·ï¤È¤·¤Þ¤¹¡£
+**    ¤³¤Î¥×¥í¥°¥é¥à¤Ë¤Ä¤¤¤Æ¤ÏÆä˲¿¤ÎÊݾڤ⤷¤Ê¤¤¡¢°­¤·¤«¤é¤º¡£
+**    
+**    Everyone is permitted to do anything on this program
+**    including copying, modifying, improving, 
+**    as long as you don't try to pretend that you wrote it.
+**    i.e., the above copyright notice has to appear in all copies.  
+**    Binar y distribution requires original version messages.
+**    You don't have to ask before copying, redistribution or publishing.
+**    THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE.
+***********************************************************************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+#ifdef __cplusplus
+}
+#endif
+
+/* Replace nkf's getchar/putchar for variable modification */
+/* we never use getc, ungetc */
+
+#undef getc
+#undef ungetc
+#define getc(f)        (input_ctr>=i_len?-1:input[input_ctr++])
+#define ungetc(c,f)    input_ctr--
+
+#define INCSIZE                32
+#undef putchar
+#undef TRUE
+#undef FALSE
+#define putchar(c)     nkf_putchar(c)
+
+/* Input/Output pointers */
+
+static unsigned char *output;
+static unsigned char *input;
+static STRLEN input_ctr;
+static STRLEN i_len;
+static STRLEN output_ctr;
+static STRLEN o_len;
+static STRLEN incsize;
+
+static
+SV *result;
+
+/* put one char in the result string variable */
+
+static int nkf_putchar_grow(unsigned int c) ;
+
+/* inline ... no use */
+static
+int
+nkf_putchar(unsigned int c) 
+{
+    /* string length is enough? */
+    if(output_ctr<o_len) {
+       return output[output_ctr++] = c;
+    } else {
+       return nkf_putchar_grow(c) ;
+    }
+}
+
+static
+int
+nkf_putchar_grow(unsigned int c) 
+{
+    /* extends string length */
+    o_len += incsize;
+    SvGROW(result, o_len);
+    /* to avoid linear growing, increase extension size */
+    incsize *= 2;
+    output = SvPVX(result);
+    /* SvPV(result,o_len) breaks o_len */
+    return output[output_ctr++] = c;
+}
+
+/* Include kanji filter main part */
+/* getchar and putchar will be replaced during inclusion */
+
+#define PERL_XS 1
+#include "../utf8tbl.c"
+#include "../nkf.c"
+
+/* package defenition  */
+
+/* nkf accepts variable length arugments. The last argument is */
+/* the input data. Other strings are flags for nkf translation.    */
+
+MODULE = NKF           PACKAGE = NKF           
+
+SV *
+nkf(...)
+    PROTOTYPE: @
+    PREINIT:
+    SV* sv;
+    SV* last;
+    char **argv;
+    char *cp;
+    char *data;
+    STRLEN cplen,rlen;
+    int i,argc;
+    CODE:
+
+    /* Flags are reset at each call. */
+    reinit();
+
+    argc = items - 1;
+
+    /* Process flags except the last once */
+    for (i=0;i<argc;i++) {
+        sv = ST(i);
+        cp = SvPV(sv,cplen);
+        if(*cp != '-') continue;
+       options(cp);
+    }
+
+    /* Get input data pointer from the last variable. */
+    data = SvPV(ST(argc),i_len);
+    input_ctr = 0;
+
+    if(x0201_f == WISH_TRUE)
+         x0201_f = ((!iso2022jp_f)? TRUE : NO_X0201);
+
+    /* allocate the result buffer */
+
+    /* During conversion, stirngs length may grow. This is the unit */
+    /* of growth */
+    incsize = INCSIZE; 
+    rlen = i_len+INCSIZE;
+    result = newSV(rlen);
+    input  = data;
+
+    /* SvPV(result,o_len) does not work here. */
+    output = SvPVX(result);
+    o_len = rlen;
+    output_ctr = 0;
+
+    /* Convestion */
+    kanji_convert(NULL);
+    /* nkf_putchar(0);    Null terminator */
+
+    RETVAL = result;
+    SvPOK_on(RETVAL);       
+    /* We cannot use 
+          SvCUR_set(RETVAL, strlen(output)); 
+       because output can contain \0. 
+     */
+    SvCUR_set(RETVAL, output_ctr);
+
+    OUTPUT:
+    RETVAL
+
diff --git a/NKF.mod/README b/NKF.mod/README
new file mode 100644 (file)
index 0000000..0e34004
--- /dev/null
@@ -0,0 +1,31 @@
+                       v2.0 \e$B2OLn??<#\e(B  kono@ie.u-ryukyu.ac.jp
+                        Sun Sep  8 09:22:41 JST 2002
+
+\e$B$3$l$O!"\e(BPerl \e$B$+$i\e(B nkf \e$B$r;H$&3HD%%b%8%e!<%k$G$9!#\e(BPerl 5 \e$B0J>e$G\e(B
+\e$BF0:n$9$k$O$:$G$9!#$$$D$b$N$h$&$K!"\e(B
+       perl Makefile.PL
+       make
+       make install
+\e$B$H$9$k$3$H$K$h$j;H$($k$h$&$K$J$j$^$9!#\e(B
+
+\e$B;H$$J}$O!"\e(B
+       use NKF;
+       $output = nkf(@flag,$input);
+
+\e$B$N$h$&$K;H$$$^$9!#\e(Bflag \e$B$O!"\e(Bnkf \e$B$HF1$8$G$9!#\e(B
+
+\e$BG[I[$N>r7o$O!"\e(Bnkf \e$B$HF1MM$H$7$^$9!#\e(B
+
+-- \e$B$*$^$1\e(B
+
+Perl module \e$B$N\e(B debug \e$B$NJ}K!\e(B
+    make >& loglog
+\e$B$G\e(Blog\e$B$r$H$j!"\e(Bcc \e$B$K\e(B-g  \e$B$rIU$12C$($F\e(Bcompile\e$B$7$^$9!#\e(B
+
+setenv PERL_DL_NONLAZY 1
+
+\e$B$7$F$+$i!"\e(B
+   gdb /usr/bin/perl
+\e$B$=$7$F!"\e(B
+   run "-Iblib/lib" "-Iblib/arch" test.pl
+\e$B$H$7$^$9!#$3$l$O!"\e(Bmake test \e$B$7$F$_$k$H%*%W%7%g%s$,$o$+$j$^$9!#\e(B
diff --git a/NKF.mod/test.pl b/NKF.mod/test.pl
new file mode 100644 (file)
index 0000000..48d2ce9
--- /dev/null
@@ -0,0 +1,119 @@
+#!/usr/bin/perl
+#
+# nkf test program for nkf 1.7
+#    Shinji KONO <kono@ie.u-ryukyu.ac.jp>
+# Sun Aug 18 12:25:40 JST 1996
+# Sun Nov  8 00:16:06 JST 1998
+# Sun Sep  8 14:03:28 JST 2002
+#
+# This is useful when you add new patch on nkf.
+# Since this test is too strict, faileurs may not mean
+# wrong conversion. 
+#
+# nkf 2.0 utf8
+# nkf 1.5 differs on MIME decoding
+# nkf 1.4 passes Basic Conversion tests
+# nkf PDS version passes Basic Conversion tests  using "nkf -iB -oB "
+#
+
+$nkf = "./nkf";
+# $nkf = "doscmd nkf.exe";
+
+# If you want to see the testing process, set next flag.
+
+$detail_all = 0;
+$diff = 1;
+
+&library_test0();
+sub test  {
+    use NKF;
+    &library_test(@_);
+}
+
+sub library_test {
+    local ($nkf,$in,@ans) = @_;
+    local ($result);
+
+
+    # $nkf =~ s/^[^_]* //;
+    local (@nkf) = split(/ /,$nkf);
+    shift(@nkf);
+    print "\nINPUT:\n",$in  if ($detail || $detail_all);
+    print "\nEXPECT:\n", $ans if ($detail || $detail_all);
+    $result = NKF::nkf(@nkf,$in);
+    print "\nGOT:\n",$result if ($detail || $detail_all);
+
+    if( $nkf =~ /-m/) {
+        $result =~ s/ //g;
+    }
+    $i = 0;
+    foreach $ans (@ans) {
+        if( $nkf =~ /-m/) {
+            $ans =~ s/ //g;
+        }
+        last if ($result eq $ans) ;
+        $i++;
+    }
+    $ans = @ans[$i];
+
+    print (($result eq $ans)?"Ok\n":"Fail\n");
+    if ($diff) {
+       if ($result ne $ans) {
+            open(R,"|od -c >tmp.result.bad"); print R $result; close(R);
+            open(R,"|od -c >tmp.expect.bad"); print R $ans; close(R);
+            system "diff -c tmp.result.bad tmp.expect.bad";
+        }
+    }
+    return $result;
+}
+
+sub library_test0 {
+BEGIN { $| = 1; print "1..3\n"; }
+END {print "not ok 1\n" unless $loaded;}
+    use NKF;
+    $loaded = 1;
+    print "ok 1\n";
+
+    ######################### End of black magic.
+
+    # Insert your test code below (better if it prints "ok 13"
+    # (correspondingly "not ok 13") depending on the success of chunk 13
+    # of the test code):
+
+    if ( nkf("-m","-e","1") ) {
+       print "ok 2\n";
+    } else {
+       print "no 2\n";
+    }
+
+    $output = nkf("\033\$@#1#3#2%B");
+    if ($output) {
+    # print $output,"\n";
+       print "ok 3\n";
+    } else {
+       print "no 3\n";
+    }
+
+    $output = nkf("-Zj","\033\$@#1#3#2%B");
+    if ($output) {
+    # print $output,"\n";
+       print "ok 4\n";
+    } else {
+       print "no 4\n";
+    }
+
+    # conversion makes strings longer
+    $output = "\244\306 " x 1024;
+       $old =  length($output);
+    $output = nkf("-j",$output);
+    if ($output) {
+    # print $output,"\n";
+       print "ok 5 $old ",length($output),"\n";
+    } else {
+       print "no 5\n";
+    }
+
+
+}
+
+do "../nkf_test.pl";
diff --git a/config.h b/config.h
new file mode 100644 (file)
index 0000000..7c9bb81
--- /dev/null
+++ b/config.h
@@ -0,0 +1,21 @@
+#ifndef _CONFIG_H_
+#define _CONFIG_H_
+
+/* UTF8 \e$BF~=PNO\e(B */
+#define UTF8_INPUT_ENABLE
+#define UTF8_OUTPUT_ENABLE
+
+/* \e$B%*%W%7%g%s$GF~NO$r;XDj$7$?;~$K!"J8;z%3!<%I$r8GDj$9$k\e(B */
+#define INPUT_CODE_FIX
+
+/* -OW \e$B%*%W%7%g%s\e(B */
+/* by Satoru Takabayashi <ccsatoru@vega.aichi-u.ac.jp> */
+#define OVERWRITE
+
+/* --cap-input, --url-input \e$B%*%W%7%g%s\e(B */
+#define CAP_URL_OPTION
+
+/* --debug, --no-output \e$B%*%W%7%g%s\e(B */
+#define CHECK_OPTION
+
+#endif /* _CONFIG_H_ */
diff --git a/nkf.1 b/nkf.1
new file mode 100644 (file)
index 0000000..29cde81
--- /dev/null
+++ b/nkf.1
@@ -0,0 +1,254 @@
+.TH NKF 1L 24/Feb/2000
+.SH NAME
+nkf \- Network Kanji code conversion Filter v2.0
+.SH SYNOPSIS
+.B nkf
+[
+.B options
+] [
+.B file
+]
+.SH DESCRIPTION
+.PP
+.B Nkf
+is a yet another kanji code converter among networks, hosts and terminals.
+It converts input kanji code to designated kanji code
+such as 7-bit JIS, MS-kanji (shifted-JIS), utf-8 or EUC.
+.PP
+One of the most unique facicility of 
+.B nkf
+is the guess of the input kanji code.
+It currently recognizes 7-bit JIS, MS-kanji (shifted-JIS),utf-8 and EUC.
+So users needn't the input kanji code specification.
+
+By default X0201 kana is converted into X0208 kana. For
+X0201 kana, SO/SI, SSO and
+ESC-(-I methods are supported. For automatic code detection, nkf assumes
+no X0201 kana in MS-Kanji. To accept X0201 in MS-Kanji, use \-X, \-x or
+\-S.
+.PP
+Options are bellow:
+.TP
+.B \-j
+output 7-bit JIS code.
+This is a default.
+.TP
+.B \-s
+output MS-kanji (shifted-JIS) code.
+.TP
+.B \-e
+output EUC (AT&T) code.
+.TP
+.B \-w
+output UTF-8 (Unicode 8bit form).
+.TP
+.B \-S
+Assume MS-Kanji and X0201 kana input. It also accpet JIS.
+AT&T EUC is recognized as X0201 kana. Without \-x flag,
+X0201 kana is converted into X0208.
+.TP
+.B \-J
+Assume  JIS input. It also accepts Japanese EUC.
+This is the default. This flag does not excludde MS-Kanji.
+.TP
+.B \-E
+Assume AT&T EUC input. It also accpet JIS.
+Same as \-J.
+.TP
+.B \-B
+Assume broken JIS-Kanji, which lost ESC.  Usefull when your site is 
+using old B-News Nihongo patch. \-B1 allows any char after ESC-( or
+ESC-$. \-B2 forces ASCII after NL.
+.TP
+.B \-W
+Assume UTF-8 input.
+.TP
+.B \-m
+MIME ISO-2022-JP/ISO8859-1 decode. (default) To see ISO8859-1 (Latin-1)
+\-l is necessary. \-mN does loose encoding. It allows line break in the
+middle of the basr64 encoding.
+.TP
+.B \-mB
+Decode MIME base64 encoded stream. Remove header or other part before
+conversion. 
+.TP
+.B \-mQ
+Decode MIME quoted stream. '_' in quoted is converted to space.
+.TP
+.B \-m0
+No MIME decode.
+.TP
+.B \-M
+MIME encode. Header style. All ASCII code and control characters are
+intact.
+.TP
+.B \-MB
+MIME encode.  Base64 stream. Kanji conversion is performed before encoding,
+so this cannot be used as a picture encoder. \MQ perfome quoted encoding.
+.TP
+.B \-l
+Input and output code is ISO8859-1 (Latin-1) and ISO-2022-JP.
+\-s, \-e and \-x are not compatible with this option.
+.TP
+.BI \-f n
+Folding on 
+.BI n 
+length in a line. Default 60. \-f40-0 forces 0 margin folding.
+.TP
+.B \-X
+Allow X0201 kana in MS-Kanji.  
+X0201 is converted into X0208 by default.
+This is default in MSDOS.
+.TP
+.B \-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.
+.TP
+.B \-Z
+Convert X0208 alphabet to ASCII. \-Z1 converts X0208 kankaku to one 
+ASCII space. \-Z2 converts X0208 kankaku to two ASCII spaces.
+.TP
+.B \-Z3
+Replacing "><&" into '&gt;', '&lt;', '&quot;', '&amp;' as in HTML.
+.TP
+.B \-I
+Replacing Non iso-2022-jp char into the strage geta character.
+.TP
+.B \-b
+bufferd output.
+This is a default.
+.TP
+.B \-u
+unbufferd output.
+.TP
+.B \-t
+no operations.
+.TP
+.B \-O
+Output result to file. The first name in arguments becomes output.
+Please be careful. If there are no file arguments, nkf.out is chosen.
+\-OW does rewriting. Original listed files are replaced by filtered
+result.
+.TP
+.BI \-i c
+output 
+.BI ESC\-$\- c
+as sequence to designate JIS-kanji
+(Default is
+.BR B .)
+.TP
+.BI \-o c
+output 
+.BI ESC\-(\- c
+as sequence to designate single-byte roman characters
+(Default is
+.BR B .)
+.TP
+.B \-r
+{de/en}crypt ROT13/47
+.TP
+.B \-v
+display Version
+.TP
+.B \-T
+Text mode output (MS-DOS)
+.TP
+.B \-c
+add CR after NL.
+.TP
+.B \-d
+delete CR after NL.
+.TP
+.B -L[wmu] new line mode
+.nf
+    -Lu   unix (LF) 
+    -Lw   windows (CRLF) 
+    -Lm   mac (CR) 
+default no conversion
+.fl
+.PP
+.B \-F
+New line preserving line folding.
+
+.PP
+hiragana/katakana translation
+   \-h1   \--katakana 
+   \-h2   \--hirakana
+   \-h3   \--hirakana-katakana
+
+.TP
+.B --
+long options
+.nf
+ --fj,--unix,--mac,--msdos, --windows
+       convert for these system
+
+ --jis,--euc,--sjis,--mime,--base64  
+       convert for named code
+ --jis-input,--euc-input,--sjis-input,--mime-input,--base64-input
+       assume input system
+
+ -- ignore rest of -option
+
+ --help
+ --version
+.fl
+
+.SH "FILES"
+nkf - binary
+.SH AUTHOR
+Itaru Ichikawa <ichikawa@flab.fujitsu.co.jp>,
+(was ichikawa@fujitsu.JUNET)
+.SH EDITOR
+a_kuroe@hoffman.cc.sophia.ac.jp (Akihiko Kuroe),
+kono@ie.u-ryukyu.ac.jp (Shinji KONO),
+furukawa@tcp-ip.or.jp ( Rei FURUKAWA    )`
+.SH BUGS
+.B Nkf
+cannot handle some input that contains mixed kanji codes.
+Automatic code detection 
+becomes very weak with \-x, \-X and \-S. 
+MIME encoding is very loose.
+
+.fl
+
+.SH ACKNOWLEDGE
+
+Thanks for those people.
+
+nkf 1.7,1.9,2.0
+
+Akio Furukawa,
+OHARA Shigeki,
+Hiroaki Sengoku,
+Ikuhiro MORITA,
+Junn Ohta,
+KAWAMURA Masao,
+Kazuhiko Mori,
+Keitaro Isokawa,
+Ken-ichi Hirose,
+Ki-ichiro SATO,
+Kiwamu Aoyama,
+Koichi Hirayama,
+Mitsuru Hase,
+OHARA Shigeki,
+Rei FURUKAWA,
+Satoru Takabayashi,
+Shigeyuki Takagi,
+Shin MICHIMUKO,
+Tsutomu Sakai,
+YAMASHITA Junji,
+Yasuyuki Sato,
+Yoshiaki Yanagihara,
+Yoshiaki Yanagihara,
+hat@so-net,
+SHIOZAKI Takehiko,
+Koji Arai,
+Eiichiro Itani,
+Masayuki Hatta,
+and many others.
+
+URL:
+     www.ie.u-ryukyu.ac.jp/~kono/nkf/
diff --git a/nkf.1j b/nkf.1j
new file mode 100644 (file)
index 0000000..3f4120e
--- /dev/null
+++ b/nkf.1j
@@ -0,0 +1,424 @@
+.TH NKF 2 9/Sep/2002
+.SH NAME
+nkf \- \e$B%M%C%H%o!<%/MQ4A;z%3!<%IJQ49%U%#%k%?\e(B v2.0
+.SH SYNOPSIS
+.B nkf
+.RI [ options ]
+.RI [ file ]
+.SH DESCRIPTION
+\fInkf\fP\e$B$O%M%C%H%o!<%/$G%a!<%k$d%K%e!<%9$NFI$_=q$-$r$9$k$?$a$K:n$i$l$?!"4A\e(B
+\e$B;z%3!<%I$NJQ49%U%#%k%?$G$"$k!#\e(B
+.PP
+\e$B$3$N\e(B\fInkf\fP\e$B$NFCD'$H$7$F$O!"F~NO4A;z%3!<%I7O$NE}7WE*$J<+F0G'<15!G=$,$"$k!#\e(B
+\e$B$3$N$?$a!"MxMQ<T$O!"F~NO4A;z%3!<%I7O$,2?$G$"$k$+$rCN$i$J$/$F$b!"=PNO4A;z\e(B
+\e$B%3!<%I7O$N$_;XDj$9$l$PNI$$$3$H$K$J$k!#$?$@!"$3$NH=Dj5!9=$O!"M}O@E*$K$O40\e(B
+\e$BA4$G$O$J$$$,!"DL>o$N%K%e!<%9$d%a!<%k$N%a%C%;!<%8$K$D$$$F$O3N<B$KF0:n$9$k\e(B
+\e$B0BA4$J$b$N$K$O$J$C$F$$$k!#\e(B
+.PP
+\e$B8=:_!"\e(B\fInkf\fP\e$B$,G'<1$G$-$kF~NO$N4A;z%3!<%I7O$O!"$$$o$f$k!V\e(BJIS\e$B%3!<%I!W\e(B(ISO-
+2022-JP\e$B$K4p$E$/$b$N\e(B)\e$B!"\e(BMS\e$B4A;z%3!<%I\e(B(\e$B%7%U%H\e(BJIS)\e$B!"F|K\8l\e(BEUC(AT&T\e$B%3!<%I\e(B)\e$B$N$$\e(B
+\e$B$:$l$+$G$"$k!#=PNO$9$k4A;z%3!<%I7O$b!"$3$N\e(B3\e$B<oN`$G$"$k!#\e(B
+.PP
+\e$BF~NO$O!"%U%!%$%k$r;XDj$7$J$1$l$P!"I8=`F~NO$H$J$k!#=PNO$OI8=`=PNO$G$"$k!#\e(B
+.PP
+\e$B;XDj$G$-$k%*%W%7%g%s$O!"0J2<$NDL$j!#\e(B\fB\-mu\fP \e$B$N$h$&$KB3$1$k$3$H$,$G$-$k!#\e(B
+.TP
+.B \-j
+JIS\e$B%3!<%I$r=PNO$9$k!#\e(B(\e$B%G%U%)%k%H\e(B)
+.TP
+.B \-e
+EUC\e$B%3!<%I$r=PNO$9$k!#\e(B
+.TP
+.B \-s
+\e$B%7%U%H\e(BJIS\e$B%3!<%I$r=PNO$9$k!#\e(B
+.TP
+.B \-w
+UTF8\e$B%3!<%I$r=PNO$9$k!#\e(B
+.TP
+.B \-m[BQSN0]
+MIME \e$B$r2rFI$9$k!#\e(B(\e$B%G%U%)%k%H\e(B) ISO-2022-JP(base64)\e$B$H\e(BISO-8859-1(Q encode)
+\e$B$N$_$r2rFI$9$k!#\e(BISO-8859-1 (Latin-1) \e$B$r2rFI$9$k;~$O!"\e(B
+-l\e$B%U%i%0$bI,MW$G$"$k!#\e(B\-m0 \e$B$G$O\e(BMIME\e$B$r2rFI$7$J$$!#\e(B\-mQ, \-mB\e$B$G$O!"\e(B
+Q encode, B encode \e$B$5$l$F$$$k$b$N$H$7$F=hM}$9$k!#\e(B
+.nf
+  \-mB   MIME base64 stream \e$B$r2rFI$9$k!#%X%C%@$J$I$O<h$j=|$/$3$H!#\e(B
+  \-mQ   MIME quoted stream \e$B$r2rFI$9$k!#\e(B
+  \-mS   MIME \e$B$N%A%'%C%/$r87$7$/$9$k\e(B (\e$B%G%U%)%k%H\e(B)
+  \-mN   MIME \e$B$N%A%'%C%/$r4K$/$9$k\e(B
+  \-m0   MIME \e$B$r2rFI$7$J$$!#\e(B
+
+   \-mS \e$B$O!"@k8@$NFbMF$H!"$=$N8e$KB3$/\e(Bbase64\e$B$N@09g@-$r%A%'%C%/$9$k!#\e(B
+   \-mN  \e$B$O!"2~9T$G@Z$i$l$?\e(BMIME\e$B$J$I$b2rFI$9$k!#2rFI$,;_$^$i$J$$$3$H$b$"$k!#\e(B
+.fi
+.TP
+.B  \-M[BQ] 
+MIME \e$B$KJQ49$9$k!#\e(BJIS\e$B$K%3!<%IJQ49$7$F$+$i\e(Bbase64\e$B$5$l$k!#\e(B
+.RS
+.nf
+  \-M    \e$B%X%C%@7A<0$KJQ49$9$k\e(B
+  \-MB   base64 stream \e$B$KJQ49$9$k\e(B
+  \-MQ   Quoted stream \e$B$KJQ49$9$k\e(B
+.fi
+.TP
+.B "\-J \-E \-S \-X \-B"
+\e$B4|BT$5$l$kF~NO%3!<%I$N@-<A$r;XDj$9$k!#\e(B
+.RS
+.IP \fB\-J\fP
+ISO-2022-JP\e$B$r2>Dj$9$k!#\e(B
+.IP \fB\-E\fP
+\e$BF|K\8l\e(BEUC(AT&T)\e$B$r2>Dj$9$k!#\e(B
+.IP \fB\-S\fP
+MS\e$B4A;z$r2>Dj$9$k!#\e(BX0201\e$B2>L>$b2>Dj$5$l$k!#\e(B
+.IP \fB\-X\fP
+MS\e$B4A;zCf$K\e(BX0201\e$B2>L>$,$"$k$H2>Dj$9$k!#\e(B
+.IP \fB\-B\fP
+\e$B2u$l$?\e(B(Broken)JIS\e$B%3!<%I!#\e(BESC\e$B$,$J$/$J$C$?$H2>Dj$9$k!#\e(B
+.RS
+.IP \fB\-B1\fP
+ \fBESC-(\fP, \fBESC-$\fP \e$B$N$"$H$N%3!<%I$rLd$o$J$$\e(B
+.IP \fB\-B2\fP
+\e$B2~9T$N$"$H$K6/@)E*$K\e(BASCII\e$B$NLa$9\e(B
+.RE
+.RE
+.TP
+.BI \-f ?
+\e$B0l9T\e(B\fI?\fP\e$BJ8;z$K$J$k$h$&$K4JC1$J@07A$r$*$3$J$&!#%G%U%)%k%H$O\e(B
+60\e$BJ8;z$G$"$k!#\e(B
+.TP
+.B \-Z
+X0208\e$BCf$N1Q?t;z$H<c43$N5-9f$r\e(BASCII\e$B$KJQ49$9$k!#\e(B\-Z1 \e$B$O\e(BX0208\e$B4V3V$r\e(BASCII
+space\e$B$KJQ49$9$k!#\e(B\-Z2\e$B$O\e(BX0208\e$B4V3V$r\e(BASCII space \e$BFs$D$KJQ49$9$k!#<qL#$K$h$C$F\e(B
+\e$B;H$$J,$1$F$[$7$$!#\e(B
+.TP
+.B \-b
+\e$B%P%C%U%!%j%s%0=PNO$r9T$&!#\e(B(\e$B%G%U%)%k%H\e(B)
+.TP
+.B \-u
+\e$B=PNO;~$K!"%P%C%U%!%j%s%0$7$J$$!#\e(B
+ssh localhost | nkf \-u \e$B$H$$$&$h$&$K;H$&!#\e(B
+.TP
+.B \-t
+\e$B2?$b$7$J$$!#\e(B
+.TP
+.BI \-I
+iso-2022-jp\e$B0J30$N4A;z%3!<%I$r".$KJQ49!#\e(B
+.TP
+.BI \-i ?
+JIS\e$B4A;z$r;X<($9$k%7!<%1%s%9$H$7$F\e(B \fBESC-'$'-\fP\fI?\fP\e$B$r;HMQ$9$k!#\e(B
+(\e$B%G%U%)%k%H$O!"\e(BESC-'$'-'B')
+.TP
+.BI \-o ?
+1\e$B%P%$%H1Q?tJ8;z%;%C%H$r;X<($9$k%7!<%1%s%9$H$7$F!"\e(B\fBESC-'('-\fP\fI?\fP\e$B$r;HMQ$9\e(B
+\e$B$k!#\e(B
+(\e$B%G%U%)%k%H$O!"\e(BESC-'('-'B')
+.TP
+.B \-r
+ROT13/47\e$B$NJQ49$r$9$k!#\e(B
+.TP
+.B \-v
+\e$B%P!<%8%g%s$rI=<($9$k!#\e(B
+.TP
+.B \-T
+\e$B%F%-%9%H%b!<%I$G=PNO$9$k!#\e(B(MS-DOS\e$B>e$G$N$_8zNO$r;}$D\e(B)
+.TP
+.B \-l
+0x80-0xfe\e$B$N%3!<%I$r\e(BISO-8859-1 (Latin-1)\e$B$H$7$F07$&!#\e(B
+JIS\e$B%3!<%I%"%&%H%W%C%H$H$NAH9g$;$_$N$_M-8z!#\e(B
+\-s, \-e, \-x\e$B$H$ON>N)$7$J$$!#\e(B
+.TP
+.B \-x
+\e$BDL>o$*$3$J$o$l$k\e(BX0201\e$B2>L>\e(B->X0208\e$B$N2>L>JQ49$r$7$J$$$G!"\e(B
+ X0201\e$B2>L>$rJ]B8$9$k!#F~NO$O!"\e(BMS\-Kanji\e$B$N\e(B1byte\e$B2>L>!"\e(BSO/SI\e$B!"\e(B
+ESC\-(\-I, SSO\e$B$r<u$1IU$1$k!#=PNO$O!"F|K\8l\e(BEUC\e$BCf$G$O\e(BSSO\e$B!"\e(B
+JIS\e$B$G$O\e(B ESC\-'('\-I \e$B$r;H$&!#\e(B
+.TP
+.B \-O
+\e$B%U%!%$%k$K=PNO$9$k!#\e(BUnix\e$B$G$OITMW$J5!G=$@$,\e(BWindows\e$B$d\e(BMSDOS\e$B$G$O\e(B
+\e$BI,MW$i$7$$!#D>8e$N0z$-?t$G$J$/!":G8e$N%U%!%$%kL>$,=PNO%U%!%$\e(B
+\e$B%kL>$H$J$j>e=q$-$5$l$F$7$^$&$N$GCm0U!#%U%!%$%kL>$,$J$$>l9g$O!"\e(B
+nkf.out\e$B!#\e(B\-OW \e$B$G$O!"85$N%U%!%$%k$rJQ497k2L$GCV$-49$($k!#\e(B
+\e$BJ#?t$N%U%!%$%k$r=q$-49$($k$3$H$b2DG=!#\e(B
+.TP
+.B \-c
+NL\e$B$^$($K\e(BCR\e$B$rIU2C$9$k!#\e(B
+.TP
+.B \-d
+NL\e$B$^$($N\e(BCR\e$B$r:o=|$9$k!#C1FH$N\e(BCR\e$B$O!"\e(BNL\e$B$KCV$-49$($i$l$k!#\e(B
+.TP
+.B \-L[wmu] \e$B2~9T%b!<%I\e(B 
+.nf
+                   -Lu   unix (LF) 
+                   -Lw   windows (CRLF) 
+                   -Lm   mac (CR) 
+               \e$B%G%U%)%k%H$OJQ49$J$7!#\e(B
+.fi
+.TP
+.B \-- \e$BD9$$L>A0$N%*%W%7%g%s!#$3$l$i$O!">e$N%*%W%7%g%s$NAH9g$;$NJLL>!#\e(B
+.nf
+     \--fj,\--unix,\--mac,\--msdos, \--windows
+           \e$B$3$l$i$N%7%9%F%`$KE,$7$?JQ49$r$7$^$9!#\e(B
+
+     \--jis,\--euc,\--sjis,\--mime,\--base64  
+          \e$BBP1~$9$kJQ49$r$7$^$9!#\e(B
+
+     \--hirakana, \--katakana \e$BJ?2>L>!"JR2>L>JQ49\e(B
+     \--help
+     \--version
+     \--               \e$B$3$l0J9_$N%*%W%7%g%s$rL5;k$9$k\e(B
+.fi
+.SH AUTHOR
+
+.nf
+\e$B;T@n\e(B  \e$B;j\e(B   ichikawa@flab.fujitsu.co.jp     (was ichikawa@fujitsu.JUNET)
+\e$B2OLn\e(B  \e$B??<#\e(B      kono@ie.u-ryukyu.acjp
+Rei FURUKAWA    furukawa@tcp-ip.or.jp
+.fl
+
+
+.SH BUGS
+
+\e$B<B$O!"F~NO$N%3!<%I7O$NH=Dj$O!"\e(BEUC\e$B$H%7%U%H\e(BJIS\e$B$H$N<+F0H=Dj$G$"$j!":G=i$K\e(B
+\e$BFCDj$G$-$kJ8;z$,Mh$?;~E@$G3NDj$7$F$7$^$&!#$=$7$F!"FCDjITG=$N4V$OJ]N1%P%C\e(B
+\e$B%U%!$K$?$a$F$*$+$l!"3NDj8e$K=hM}$5$l$k!#$3$N$?$a!"\e(B
+.IP 1)
+7\e$B%S%C%H\e(BJIS\e$B$O>o$KG'<1$5$l$k!#%7%U%H\e(BJIS\e$B!"\e(BEUC\e$B:.9g$b$[$H$s$I$N\e(B
+\e$B>l9g$OLdBj$,$J$$!#$?$@$7!"\e(B
+.IP 2)
+\e$B%7%U%H\e(BJIS\e$B$N\e(BX0201\e$B2>L>$H\e(BEUC\e$B$,<1JL$G$-$J$$!#$7$?$,$C$F!"\e(B
+\e$B%G%U%)%k%H$G$O%7%U%H\e(BJIS\e$B$N\e(BX0201\e$B2>L>$O$J$$$H2>Dj$7$F$$$k!#\e(B
+.PP
+\e$B$3$N%U%#%k%?$NJQ49$O!"%3!<%I7O$KBP1~$7$?0l3g<LA|$r;\$9$@$1$J$N$G!"30;z\e(B
+\e$B$dFC<l5-9f$d7S@~AGJR$J$I!"\e(BJIS\e$BBh0l!"BhFs?e=`I=$K$*$$$FDj5A$5$l$F$$$J$$%3!<\e(B
+\e$B%I$K3F<R$K$h$j3d$jEv$F$i$l$?J8;zJQ49$7$J$$!#Bh;0?e=`$J$I$bJQ49$7$J$$!#\e(B
+UTF8\e$B$NF|K\8l0J30$NItJ,$K$bBP1~$7$F$$$J$$!#\e(B
+
+.SH "kono@csl.sony.co.jp (Shinji Kono) \e$B$K$h$kJQ99!#\e(B"
+
+.PP
+X0201\e$B2>L>\e(B(\e$B$$$o$f$kH>3Q$+$J\e(B)\e$B$O%G%U%)%k%H$G\e(BX0208(\e$BA43Q2>L>\e(B)\e$B$KJQ49$5$l$k!#\e(B
+\e$B$?$@$7!"%7%U%H\e(BJIS\e$B$N\e(BX0201\e$B2>L>\e(B
+\e$B$O%G%U%)%k%H$G$O\e(BEUC\e$B$@$H2r<a$5$l$F$7$^$&!#$3$l$,K>$^$7$/$J$$;~$K$O\e(B \-S \e$B$d\e(B
+\- \-X \e$B$J$I$N%U%i%0$r;H$($PNI$$!#\e(B\-X\e$B$r;XDj$9$k$H0lC63NDj$7$?%7%U%H\e(BJIS\e$B$+$i\e(B 
+EUC\e$B$K0\9T$9$k$3$H$O$J$$!#\e(BESC-(-I\e$B$K$h$k\e(B X0201\e$B$O>o$KG'<1$5$l$k!#\e(BSI/SO
+SSO\e$B$O!"\e(B\-l\e$B$,;XDj$5$l$F$$$J$1$l$P\e(BX0201\e$B$H2r<a$9$k!#\e(B
+.PP
+MIME decode\e$B$O!"\e(BISO-2022-JP\e$B$N\e(Bbase64\e$B$H!"\e(BISO-8859-1\e$B$N\e(B16\e$B?J\e(Bencode\e$B$N$_\e(B
+decode\e$B$9$k!#\e(B MIME decode\e$B$O!"C1=c$J2~9T$d6uGr$O0BA4$KFI$_Ht$P$5$l$k!#\e(B
+\e$B$H$$$&$3$H$O!"\e(B MIME decode\e$BCf$N6uGr$OJ]B8$5$l$J$$!#JQ49$O2D5U$G$O$J$$!#\e(B
+less\e$B$d\e(Brn\e$B$G9T$,J,3d$5$l$?;~$O!"\e(B Terminal\e$B$K$h$C$F0[$J$k\e(B ESC-[-K \e$B$J$I$,A^F~\e(B
+\e$B$5$l$k$N$G!"40A4$K$O\e(Bdecode \e$B$G$-$J$$!#\e(B\-mN \e$B$G$O!"%A%'%C%/$,4K$$$N$G\e(B
+decode\e$B$G$-$k>l9g$b$"$k!#\e(B
+ISO-8859-1 \e$B=PNO$O\e(BJIS \e$B%3!<%I=PNO$H$7$+N>N)$7$J$$!#\e(B
+.PP
+Fold \e$B5!G=$O\e(Bfmt\e$B$H0[$J$j9TF,$N6uGr$rL5;k$9$k!#6XB'=hM}$O$"$k$,;XDj$5$l$?\e(B
+\e$BD9$5\e(B+5\e$B$G6/@)2~9T$9$k!#\e(B-f60-10 \e$B$J$I$H$9$k$H6/@)2~9T$NM>CO\e(B(fold-margin)
+\e$B$rD4@0$G$-$k!#\e(B-f40-0\e$B$H$9$k$H6XB'=hM}$J$7$H$J$k!#\e(B
+.PP
+X0201\e$B2>L>$O\e(Brot47\e$B$5$l$J$$!#\e(B
+
+.SH nkf 1.6 "kono@ie.u-ryukyu.ac.jp (Shinji Kono) \e$B$K$h$kJQ99!#\e(B"
+
+ -B \e$B$N\e(Blevel\e$B$r\e(B0,1,2 \e$B$KA}$d$7$?!#\e(BMIME\e$B$N\e(Bbase64, Q-Encoding\e$B$r2rFI$9$k\e(B
+\e$B5!G=$rIU$1$?!#%X%C%@$J$I$O2rFI$7$J$$$N$G!"\e(BEncode\e$B$5$l$?ItJ,$@$1$r\e(B
+\e$BDL$9I,MW$,$"$k!#\e(B -mB \e$B$O!"\e(Bnkf1.5\e$B$H0c$&F0$-$r$9$k$N$G!"\e(B-B -m \e$B$H$9$k$3$H!#\e(B
+
+.SH nkf 1.6.1
+
+\-Z1 \e$B$G\e(BX0208\e$B4V3V\e(B\->ASCII space\e$B$NJQ49$r$*$3$J$&!#\e(B
+\-Z2 \e$B$G\e(BX0208\e$B4V3V\e(B\->ASCII space 2\e$B8D$NJQ49$r$*$3$J$&!#\e(B
+.PP
+
+.SH nkf 1.7
+.PP
+ESC-$-(-B \e$B$J$I$K$bBP1~$9$k$h$&$K$J$C$?!#\e(B
+.PP
+copy right \e$B$NHs1DMx$N>r7o$,ITMW$K$J$C$?!#;HMQ;~$NLd$$9g$o$;$bITMW!#\e(B
+.PP
+Perl Extension \e$B$H$7$F;H$($k$h$&$K$J$C$?!#\e(B
+
+.SH nkf 1.9
+.PP
+MIME \e$B%(%s%3!<%I$N5!G=;~$G$b!"%3!<%IJQ49$5$l$7$^$&$N$GCm0U!#\e(B
+base64 \e$B%(%s%3!<%I$G$O2~9T;~$K@hF,$K6uGr$,IU$/$N$G%a!<%k%X%C%@\e(B
+\e$B$K;HMQ$G$-$k!#\e(B
+.PP
+\e$B%3!<%IJQ49%b%8%e!<%k$O!"%5%V%k!<%A%s$r7QB3$K$h$C$F@\B3$9$k\e(B
+\e$B7A<0$H$J$C$?!#J#?t$NJQ49$r<+M3$K@\B3$G$-$k$h$&$K$J$C$?!#\e(B
+.PP
+      getc <-- iconv --> oconv --> other conversion --> putc
+.PP
+\e$B$H$$$&7A$G!"=g$K8F$S=P$5$l$k!#\e(B
+
+.PP
+\e$BD9$$%*%W%7%g%sL>$r5v$9$h$&$K$J$C$?!#\e(B
+    \--mac
+    \--jis
+    \--unix
+\e$B$J$I!#\e(B
+
+.SH
+UTF-8 \e$B%5%]!<%H$K$D$$$F\e(B
+.PP
+furukawa@tcp-ip.or.jp \e$B$K$h$k!#\e(B
+.PP
+\e$B=>Mh$N\e(B nkf \e$B$HF1MM$K!"\e(Bnkf -e \e$B$H$7$F5/F0$9$k$H!"<+F0H=JL$G\e(B
+UTF-8 \e$B$HH=Dj$5$l$l$P!"$=$N$^$^\e(B euc-jp \e$B$KJQ49$5$l$k!#\e(B
+
+.PP
+\e$B%*%W%7%g%s$G!"J8;z%3!<%I$r;XDj$G$-$k!#\e(B
+
+    \-w   \e$B=PNO$r\e(B utf-8 \e$B$K;XDj$7$^$9\e(B
+    \-W   \e$BF~NO$r\e(B utf-8 \e$B$H2>Dj$7$^$9\e(B
+.PP
+\e$BFC$K<+F0H=JL!"%3!<%I:.:_!"%(%i!<=hM}7O$K$OH=Dj$r<:GT$9$k$3$,$"$k!#\e(B
+
+.PP
+  \-Z3 \e$B%*%W%7%g%s$N?7@_\e(B
+        X0208 \e$B$N\e(B '\e$B!d\e(B', '\e$B!c\e(B', '\e$B!I\e(B', '\e$B!u\e(B'  \e$B$r$=$l$>$l\e(B
+        '&gt;', '&lt;', '&quot;', '&amp;' \e$B$KJQ49$7$^$9\e(B
+
+.SH nkf 2.0 
+
+.PP
+newline \e$B$rJ]B8$9$k\e(B folding -F\e$B!#\e(Bfmt\e$B$K6a$$F0:n$r$9$k!#\e(B
+
+.PP
+folding \e$B$N%^!<%8%s!#\e(B-f60-0 \e$B$J$I$H!"\e(B0\e$B$K$9$k$H6X\e(B
+\e$BB'$;$:$K!"6/@)E*$K\e(Bfolding\e$B$9$k!#7HBS$K%a!<%k$rAw$k$H$-$K;H\e(B
+\e$B$&!#\e(B
+
+.PP
+nkf \-f40\-0
+\e$B$J$I$H$7$F%a!<%k$r\e(B 40 \e$BJ8;z$E$D@Z$j=P$7$F!"\e(B
+\e$B!V\e(BSubject 160 \e$BJ8;zL\$+$i\e(B 199 \e$BJ8;zL\$^$G!W\e(B
+\e$B!VK\J8\e(B    200 \e$BJ8;zL\$+$i\e(B 239 \e$BJ8;zL\$^$G!W\e(B
+\e$B$H$9$k!#\e(B
+
+.SH
+MIME\e$B4X78\e(B
+
+.PP
+fixed mime mode ( -mQ ) \e$B$G\e(B =? \e$B$G\e(B Q-encode \e$B$,H4$1$F$7$^$&%P%0$N=$@5!#\e(B
+
+.PP
+Q encode \e$B$N\e(B Soft Wrap \e$B$KBP1~!#\e(B
+
+.PP
+MIME encode \e$B$N\e(BWrap\e$B$G$O!"@hF,$K0lJ8;z$N6uGrA^F~!#\e(B
+\e$B$7$?!#$"\e(BA \e$B$N\e(B MIME \e$BJQ49$O!"\e(BA \e$B$r4^$s$GJQ49$7$J$$$H$$$1\e(B
+\e$B$J$$$,!"BP1~$7$F$$$J$$!#\e(BRFC\e$B$K$OH?$7$?F0:n$@$,!"\e(B
+encoded word \e$B4V$N\e(Bwhite space\e$B$OL5;k$5$l$k!#\e(B
+nkf_test.pl \e$B$G$O!"\e(BMIME\e$B$N6uGr$r:o=|$7$F$+$iHf3S$7$F$$$k!#\e(B
+
+.PP
+non-strict mime \-MN \e$B$G$O!"6uGr!"2~9T$r$^$?$$$G!"\e(Bbase64 encoding
+\e$B$r2rFI$9$k!#$3$l$G!"%9%/%j!<%s$+$i\e(Bcut&paste\e$B$G\e(B
+\e$B%G%3!<%I$9$k$3$H$b2DG=!#;_$^$i$J$$2DG=@-$"$j!#\e(B
+
+.PP
+nkf_test.pl \e$B$N%P%0%A%'%C%/$rA}$d$7$?!#\e(B
+test \e$B$,<:GT$7$?$H$-$K\e(Bdiff\e$B$r<h$k$h$&$K$7$?!#\e(B
+make_test.pl \e$B$G%F%9%H:n@.2DG=!#\e(B
+
+.PP
+Perl module\e$B$G!"\e(B\\0\e$B$r4^$`J8;zNs$bJQ49$G$-$k$h$&$K$J$C$?!#\e(B
+Perl XS\e$B$G$NJ8;zNs$ND9$5$N07$$$r=$@5!#\e(B
+
+NKF\e$B$r\e(BNKF.mod\e$B$K$7$?$N$G!"\e(BMac OS X \e$B$G\e(BMake\e$B$G%3%s%Q%$%k2=!#\e(B
+
+.PP
+rot13\e$B$,\e(B1.9\e$B$GF0$+$J$/$J$C$F$$$?$N$r=$@5!#\e(B
+
+.PP
+\-Z \e$B$N4V3V$d$*$+$7$JJQ49$N=$@5\e(B
+
+.PP
+hiragana/katakana \e$BJQ49$,$G$-$k$h$&$K$J$j$^$7$?!#\e(B
+   \-h1   \--katakana \e$B$R$i$,$J\e(B->\e$B$+$?$+$J\e(B
+   \-h2   \--hirakana \e$B$+$?$+$J\e(B->\e$B$R$i$,$J\e(B
+   \-h3   \--hirakana-katakana \e$B$+$?$+$J\e(B<->\e$B$R$i$,$J\e(B
+
+\-OW \e$B$G!"0z?t$N%U%!%$%k$rD>@\!"CV$-49$($k$3$H$,$G$-$^$9!#\e(B
+
+
+.SH ACKNOWLEDGE
+
+\e$B0J2<$N$+$?$,$?!"$I$&$b$"$j$,$H$&$4$6$$$^$7$?!#\e(B
+
+.nf
+
+nkf 1.4
+morb@fujitsu, kiss@ayumi.stars.flab.fujitsu, cen122@flab.fujitsu,
+yuki@flab.fujitsu \e$BB>!"\e(Bfujitsu & flab.fujitsu\e$B$N3'$5$s$N6(NO$K46<U!#\e(B
+shinoda@cs.titech, kato@cs.titech, uematsu@cs.titech  TNX
+kono@ie.u-ryukyu.ac.jp
+
+nkf 1.9
+Akio Furukawa
+From: OHARA Shigeki
+Hiroaki Sengoku 
+Ikuhiro MORITA (\e$B?9ED\e(B \e$B0i9(\e(B)
+Junn Ohta
+KAWAMURA Masao
+Kazuhiko Mori 
+Keitaro Isokawa
+Ken-ichi Hirose
+Ki-ichiro SATO 
+Kiwamu Aoyama
+Koichi Hirayama 
+Mitsuru Hase\e$B!JD9C+!!K~!K\e(B
+OHARA Shigeki (\e$BBg86\e(B \e$B=E<y\e(B)
+Rei FURUKAWA 
+Satoru Takabayashi
+Shigeyuki Takagi
+Shin MICHIMUKO 
+Tsutomu Sakai 
+YAMASHITA Junji (\e$B;32<\e(B \e$B=c;J\e(B)
+Yasuyuki Sato 
+Yoshiaki Yanagihara
+Yoshiaki Yanagihara 
+hat@so-net
+\e$B#D#C#C5;=QItEOJU\e(B
+\e$B$+$H$Z\e(B / \e$B2CF#\e(B \e$B5.;J\e(B
+\e$B$+$Y\e(Bdais
+\e$B$R$m$;\e(B \e$B$^$5$"$-\e(B
+\e$B%$%s%H%i%M%C%H%7%9%F%`\e(B(\e$B3t\e(B)\e$B>>Hx\e(B
+\e$B1-;tJ8IR\e(B
+\e$B1v:j\e(B \e$B5#I'\e(B(SHIOZAKI Takehiko)
+\e$B2OB<2mIW\e(B (Media Lab.)
+\e$B2OLn\e(B \e$B9/;J\e(B
+\e$B4n@%!HE_G-!I9@!wFn9q2-Fl\e(B
+\e$B6b0f\e(B \e$BCRI'\e(B
+\e$B7KED\e(B \e$BM4;K\e(B \e$B!J$+$D$i$@\e(B \e$B$^$5$7!K\e(B
+\e$B9b6659LA\e(B
+\e$B9q5H\e(B
+\e$B9u9>L@I'\e(B
+\e$B;0Bp@5BY\e(B
+\e$B;3AR\e(B \e$B??\e(B
+\e$B;3K\\e(B \e$BK'?M\e(B
+\e$B;3LnM5;J\e(B (\e$B$d$^$N$f$&$8\e(B)
+\e$B=EB<K!9n\e(B
+\e$B>.Eg4pLw\e(B
+\e$B>eED!!7r\e(B
+\e$B?70f\e(B \e$B9/;J\e(B (Koji Arai)
+\e$B?9!!@i3(;R\e(B
+\e$B?9!!OBI'\e(B
+\e$B?eLn\e(B \e$B5.J8\e(B
+\e$BA0COOB=S\e(B
+\e$BCg=!:,!wJBNs?.Mj8&\e(B
+\e$BCvC+\e(B \e$B1Q0lO:\e(B == Eiichiro Itani
+\e$BF#86!!=(9T!!\e(B
+\e$BH,ED\e(B \e$B??9T\e(B (Masayuki Hatta)
+\e$BHx@nIRLi\e(B
+\e$BK>7n\e(B \e$B9';V\e(B 
+\e$BLZB<!J!wC^GHBg3X?t3X8&5f2J!K\e(B
+\e$BLnB<=S>4\e(B
+\e$BM-2,!w%_%N%k%?\e(B
+\e$BM-Bt\e(B \e$BL@9(\e(B
+\e$BMn9g0l4n\e(B
+\e$BNS\e(B  \e$BN<\e(B
+\e$BT"0B\e(B \e$B<#\e(B
+
+
+\e$B2OLn??<#\e(B
+     www.ie.u-ryukyu.ac.jp/~kono/nkf/
diff --git a/nkf.c b/nkf.c
new file mode 100644 (file)
index 0000000..3fa9977
--- /dev/null
+++ b/nkf.c
@@ -0,0 +1,3240 @@
+/** Network Kanji Filter. (PDS Version)
+************************************************************************
+** Copyright (C) 1987, Fujitsu LTD. (Itaru ICHIKAWA)
+** \e$BO"Mm@h!'\e(B \e$B!J3t!KIY;NDL8&5f=j!!%=%U%H#38&!!;T@n!!;j\e(B 
+** \e$B!J\e(BE-Mail Address: ichikawa@flab.fujitsu.co.jp\e$B!K\e(B
+** Copyright (C) 1996,1998
+** Copyright (C) 2002
+** \e$BO"Mm@h!'\e(B \e$BN05eBg3X>pJs9)3X2J\e(B \e$B2OLn\e(B \e$B??<#\e(B  mime/X0208 support
+** \e$B!J\e(BE-Mail Address: kono@ie.u-ryukyu.ac.jp\e$B!K\e(B
+** \e$BO"Mm@h!'\e(B COW for DOS & Win16 & Win32 & OS/2
+** \e$B!J\e(BE-Mail Address: GHG00637@niftyserve.or.p\e$B!K\e(B
+**
+**    \e$B$3$N%=!<%9$N$$$+$J$kJ#<L!$2~JQ!$=$@5$b5vBz$7$^$9!#$?$@$7!"\e(B
+**    \e$B$=$N:]$K$O!"C/$,9W8%$7$?$r<($9$3$NItJ,$r;D$9$3$H!#\e(B
+**    \e$B:FG[I[$d;(;o$NIUO?$J$I$NLd$$9g$o$;$bI,MW$"$j$^$;$s!#\e(B
+**    \e$B1DMxMxMQ$b>e5-$KH?$7$J$$HO0O$G5v2D$7$^$9!#\e(B
+**    \e$B%P%$%J%j$NG[I[$N:]$K$O\e(Bversion message\e$B$rJ]B8$9$k$3$H$r>r7o$H$7$^$9!#\e(B
+**    \e$B$3$N%W%m%0%i%`$K$D$$$F$OFC$K2?$NJ]>Z$b$7$J$$!"0-$7$+$i$:!#\e(B
+**
+**    Everyone is permitted to do anything on this program 
+**    including copying, modifying, improving,
+**    as long as you don't try to pretend that you wrote it.
+**    i.e., the above copyright notice has to appear in all copies.  
+**    Binary distribution requires original version messages.
+**    You don't have to ask before copying, redistribution or publishing.
+**    THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE.
+***********************************************************************/
+
+/***********************************************************************
+** UTF-8 \e$B%5%]!<%H$K$D$$$F\e(B
+**    \e$B=>Mh$N\e(B nkf \e$B$HF~$l$+$($F$=$N$^$^;H$($k$h$&$K$J$C$F$$$^$9\e(B
+**    nkf -e \e$B$J$I$H$7$F5/F0$9$k$H!"<+F0H=JL$G\e(B UTF-8 \e$B$HH=Dj$5$l$l$P!"\e(B
+**    \e$B$=$N$^$^\e(B euc-jp \e$B$KJQ49$5$l$^$9\e(B
+**
+**    \e$B$^$@%P%0$,$"$k2DG=@-$,9b$$$G$9!#\e(B
+**    (\e$BFC$K<+F0H=JL!"%3!<%I:.:_!"%(%i!<=hM}7O\e(B)
+**
+**    \e$B2?$+LdBj$r8+$D$1$?$i!"\e(B
+**        E-Mail: furukawa@tcp-ip.or.jp
+**    \e$B$^$G8fO"Mm$r$*4j$$$7$^$9!#\e(B
+***********************************************************************/
+#include "config.h"
+
+static char *CopyRight =
+      "Copyright (C) 1987, FUJITSU LTD. (I.Ichikawa),2000 S. Kono, COW, 2002 Kono, Furukawa";
+static char *Version =
+      "2.0";
+static char *Patchlevel =
+      "1/0209/Shinji Kono";
+
+/*
+**
+**
+**
+** USAGE:       nkf [flags] [file] 
+**
+** Flags:
+** b    Output is bufferred             (DEFAULT)
+** u    Output is unbufferred
+**
+** t    no operation
+**
+** j    Outout code is JIS 7 bit        (DEFAULT SELECT) 
+** s    Output code is MS Kanji         (DEFAULT SELECT) 
+** e    Output code is AT&T JIS         (DEFAULT SELECT) 
+** w    Output code is AT&T JIS         (DEFAULT SELECT) 
+** l    Output code is JIS 7bit and ISO8859-1 Latin-1
+**
+** m    MIME conversion for ISO-2022-JP
+** I    Convert non ISO-2022-JP charactor to GETA by Pekoe <pekoe@lair.net>
+** i_ Output sequence to designate JIS-kanji (DEFAULT_J)
+** o_ Output sequence to designate single-byte roman characters (DEFAULT_R)
+** M    MIME output conversion 
+**
+** r  {de/en}crypt ROT13/47
+**
+** v  display Version
+**
+** T  Text mode output        (for MS-DOS)
+**
+** x    Do not convert X0201 kana into X0208
+** Z    Convert X0208 alphabet to ASCII
+**
+** f60  fold option
+**
+** m    MIME decode
+** B    try to fix broken JIS, missing Escape
+** B[1-9]  broken level
+**
+** O   Output to 'nkf.out' file or last file name
+** OW  Overwrite  rewrite original file by converted result
+** d   Delete \r in line feed 
+** c   Add \r in line feed 
+** -- other long option
+** -- ignore following option (don't use with -O )
+**
+**/
+
+/******************************/
+/* \e$B%G%U%)%k%H$N=PNO%3!<%IA*Br\e(B */
+/* Select DEFAULT_CODE */
+#define DEFAULT_CODE_JIS
+/* #define DEFAULT_CODE_SJIS */
+/* #define DEFAULT_CODE_EUC */
+/* #define DEFAULT_CODE_UTF8 */
+/******************************/
+
+#if (defined(__TURBOC__) || defined(LSI_C)) && !defined(MSDOS)
+#define MSDOS
+#endif
+
+#ifdef PERL_XS
+#undef OVERWRITE
+#endif
+
+#ifndef PERL_XS
+#include <stdio.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#if defined(MSDOS) || defined(__OS2__) 
+#include <fcntl.h>
+#include <io.h>
+#endif
+
+#ifdef MSDOS
+#ifdef LSI_C
+#define setbinmode(fp) fsetbin(fp)
+#else /* Microsoft C, Turbo C */
+#define setbinmode(fp) setmode(fileno(fp), O_BINARY)
+#endif
+#else /* UNIX,OS/2 */
+#define setbinmode(fp)
+#endif
+
+#ifdef _IOFBF /* SysV and MSDOS */
+#define       setvbuffer(fp, buf, size)       setvbuf(fp, buf, _IOFBF, size)
+#else /* BSD */
+#define       setvbuffer(fp, buf, size)       setbuffer(fp, buf, size)
+#endif
+
+/*Borland C++ 4.5 EasyWin*/
+#if defined(__TURBOC__) && defined(_Windows) && !defined(__WIN32__) /*Easy Win */
+#define         EASYWIN
+#include <windows.h>
+#endif
+
+#ifdef OVERWRITE
+/* added by satoru@isoternet.org */
+#include <sys/stat.h>
+#ifndef MSDOS
+#include <unistd.h>
+#include <utime.h>
+#endif
+#endif 
+
+#define         FALSE   0
+#define         TRUE    1
+
+/* state of output_mode and input_mode  
+
+   c2           0 means ASCII
+                X0201
+                ISO8859_1
+                X0208
+                EOF      all termination
+   c1           32bit data
+
+ */
+
+#define         ASCII           0
+#define         X0208           1
+#define         X0201           2
+#define         ISO8859_1       8
+#define         NO_X0201        3
+
+/* Input Assumption */
+
+#define         JIS_INPUT       4
+#define         SJIS_INPUT      5
+#define         LATIN1_INPUT    6
+#define         FIXED_MIME      7
+#define         STRICT_MIME     8
+
+/* MIME ENCODE */
+
+#define                ISO2022JP       9
+#define        JAPANESE_EUC   10
+#define                SHIFT_JIS      11
+
+#define                UTF8           12
+#define                UTF8_INPUT     13
+#define                UTF16_INPUT    14
+#define                UTF16BE_INPUT  15
+
+#define         WISH_TRUE      15
+
+/* ASCII CODE */
+
+#define         BS      0x08
+#define         NL      0x0a
+#define         CR      0x0d
+#define         ESC     0x1b
+#define         SPACE   0x20
+#define         AT      0x40
+#define         SSP     0xa0
+#define         DEL     0x7f
+#define         SI      0x0f
+#define         SO      0x0e
+#define         SSO     0x8e
+
+#define                is_alnum(c)  \
+            (('a'<=c && c<='z')||('A'<= c && c<='Z')||('0'<=c && c<='9'))
+
+#define         HOLD_SIZE       1024
+#define         IOBUF_SIZE      16384
+
+#define         DEFAULT_J       'B'
+#define         DEFAULT_R       'B'
+
+#define         SJ0162  0x00e1          /* 01 - 62 ku offset */
+#define         SJ6394  0x0161          /* 63 - 94 ku offset */
+
+#define         RANGE_NUM_MAX   18
+#define         GETA1   0x22
+#define         GETA2   0x2e
+
+
+#if defined( UTF8_OUTPUT_ENABLE ) || defined( UTF8_INPUT_ENABLE )
+#define sizeof_euc_utf8 94
+#define sizeof_euc_to_utf8_1byte 94
+#define sizeof_euc_to_utf8_2bytes 94
+#define sizeof_utf8_to_euc_C2 94
+#define sizeof_utf8_to_euc_E5B8 64
+#define sizeof_utf8_to_euc_2bytes 112
+#define sizeof_utf8_to_euc_3bytes 112
+#endif
+
+/* MIME preprocessor */
+
+
+#ifdef EASYWIN /*Easy Win */
+extern POINT _BufferSize;
+#endif
+
+/*      function prototype  */
+
+/* #define PROTO(x)  () */
+#define PROTO(x)  x 
+static  int     noconvert PROTO((FILE *f));
+static  int     kanji_convert PROTO((FILE *f));
+static  int     h_conv PROTO((FILE *f,int c2,int c1));
+static  int     push_hold_buf PROTO((int c2));
+static  void    set_iconv PROTO((int f, int (*iconv_func)()));
+static  int     s_iconv PROTO((int c2,int c1,int c0));
+static  int     e_iconv PROTO((int c2,int c1,int c0));
+#ifdef UTF8_INPUT_ENABLE
+static  int     w_iconv PROTO((int c2,int c1,int c0));
+static  int     w_iconv16 PROTO((int c2,int c1,int c0));
+static  int    w_iconv_common PROTO((int c2,int c1,int c0,unsigned short **pp));
+#endif
+#ifdef UTF8_OUTPUT_ENABLE
+static  int     e2w_conv PROTO((int c2,int c1));
+static  void    w_oconv PROTO((int c2,int c1));
+static  void    w_oconv16 PROTO((int c2,int c1));
+#endif
+static  void    e_oconv PROTO((int c2,int c1));
+static  void    s_oconv PROTO((int c2,int c1));
+static  void    j_oconv PROTO((int c2,int c1));
+static  void    fold_conv PROTO((int c2,int c1));
+static  void    cr_conv PROTO((int c2,int c1));
+static  void    z_conv PROTO((int c2,int c1));
+static  void    rot_conv PROTO((int c2,int c1));
+static  void    hira_conv PROTO((int c2,int c1));
+static  void    base64_conv PROTO((int c2,int c1));
+static  void    iso2022jp_check_conv PROTO((int c2,int c1));
+static  void    no_connection PROTO((int c2,int c1));
+static  int     no_connection2 PROTO((int c2,int c1,int c0));
+
+static  void    code_status PROTO((int c));
+
+static  void    std_putc PROTO((int c));
+static  int     std_getc PROTO((FILE *f));
+static  int     std_ungetc PROTO((int c,FILE *f));
+
+static  int     broken_getc PROTO((FILE *f));
+static  int     broken_ungetc PROTO((int c,FILE *f));
+
+static  int     mime_begin PROTO((FILE *f));
+static  int     mime_getc PROTO((FILE *f));
+static  int     mime_ungetc PROTO((int c,FILE *f));
+
+static  int     mime_begin_strict PROTO((FILE *f));
+static  int     mime_getc_buf PROTO((FILE *f));
+static  int     mime_ungetc_buf  PROTO((int c,FILE *f));
+static  int     mime_integrity PROTO((FILE *f,unsigned char *p));
+
+static  int     base64decode PROTO((int c));
+static  void    mime_putc PROTO((int c));
+static  void    open_mime PROTO((int c));
+static  void    close_mime PROTO(());
+static  void    usage PROTO(());
+static  void    version PROTO(());
+static  void    options PROTO((unsigned char *c));
+#ifdef PERL_XS
+static  void    reinit PROTO(());
+#endif
+
+/* buffers */
+
+static unsigned char   stdibuf[IOBUF_SIZE];
+static unsigned char   stdobuf[IOBUF_SIZE];
+static unsigned char   hold_buf[HOLD_SIZE*2];
+static int             hold_count;
+
+/* MIME preprocessor fifo */
+
+#define MIME_BUF_SIZE   (1024)    /* 2^n ring buffer */
+#define MIME_BUF_MASK   (MIME_BUF_SIZE-1)   
+#define Fifo(n)         mime_buf[(n)&MIME_BUF_MASK]
+static unsigned char           mime_buf[MIME_BUF_SIZE];
+static unsigned int            mime_top = 0;
+static unsigned int            mime_last = 0;  /* decoded */
+static unsigned int            mime_input = 0; /* undecoded */
+
+/* flags */
+static int             unbuf_f = FALSE;
+static int             estab_f = FALSE;
+static int             nop_f = FALSE;
+static int             binmode_f = TRUE;       /* binary mode */
+static int             rot_f = FALSE;          /* rot14/43 mode */
+static int             hira_f = FALSE;          /* hira/kata henkan */
+static int             input_f = FALSE;        /* non fixed input code  */
+static int             alpha_f = FALSE;        /* convert JIx0208 alphbet to ASCII */
+static int             mime_f = STRICT_MIME;   /* convert MIME B base64 or Q */
+static int             mimebuf_f = FALSE;      /* MIME buffered input */
+static int             broken_f = FALSE;       /* convert ESC-less broken JIS */
+static int             iso8859_f = FALSE;      /* ISO8859 through */
+static int             mimeout_f = FALSE;       /* base64 mode */
+#if defined(MSDOS) || defined(__OS2__) 
+static int             x0201_f = TRUE;         /* Assume JISX0201 kana */
+#else
+static int             x0201_f = NO_X0201;     /* Assume NO JISX0201 */
+#endif
+static int             iso2022jp_f = FALSE;    /* convert ISO-2022-JP */
+#ifdef UTF8_OUTPUT_ENABLE
+static int             w_oconv16_begin_f= 0;   /* utf-16 header */
+#endif
+
+
+#ifdef CAP_URL_OPTION
+static int cap_f = FALSE;
+static int (*i_cgetc)PROTO((FILE *)) = std_getc; /* input of cgetc */
+static int (*i_cungetc)PROTO((int c ,FILE *f)) = std_ungetc;
+static int cap_getc PROTO((FILE *f));
+static int cap_ungetc PROTO((int c,FILE *f));
+
+static int url_f = FALSE;
+static int (*i_ugetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
+static int (*i_uungetc)PROTO((int c ,FILE *f)) = std_ungetc;
+static int url_getc PROTO((FILE *f));
+static int url_ungetc PROTO((int c,FILE *f));
+#endif
+
+#ifdef CHECK_OPTION
+static int noout_f = FALSE;
+static void no_putc PROTO((int c));
+static int debug_f = FALSE;
+static void debug PROTO((char *str));
+#endif
+
+static int             e_stat = 0;
+static int             s_stat = 0;
+#ifdef UTF8_INPUT_ENABLE
+static int             w_stat = 0;
+static int             utf16_mode = UTF16_INPUT;
+#else
+static int             w_stat = -1;
+#endif
+
+static int              mimeout_mode = 0;
+static int              base64_count = 0;
+
+/* X0208 -> ASCII converter */
+
+/* fold parameter */
+static int             f_line = 0;    /* chars in line */
+static int             f_prev = 0;
+static int             fold_preserve_f = FALSE; /* preserve new lines */
+static int             fold_f  = FALSE;
+static int             fold_len  = 0;
+
+/* options */
+static unsigned char   kanji_intro = DEFAULT_J,
+                       ascii_intro = DEFAULT_R;
+
+/* Folding */
+
+#define FOLD_MARGIN  10
+#define DEFAULT_FOLD 60
+
+static int             fold_margin  = FOLD_MARGIN;
+
+/* converters */
+
+#ifdef DEFAULT_CODE_JIS
+#   define  DEFAULT_CONV j_oconv
+#endif
+#ifdef DEFAULT_CODE_SJIS
+#   define  DEFAULT_CONV s_oconv
+#endif
+#ifdef DEFAULT_CODE_EUC
+#   define  DEFAULT_CONV e_oconv
+#endif
+#ifdef DEFAULT_CODE_UTF8
+#   define  DEFAULT_CONV w_oconv
+#endif
+
+/* process default */
+static void (*output_conv)PROTO((int c2,int c1)) = DEFAULT_CONV;   
+
+static void (*oconv)PROTO((int c2,int c1)) = no_connection; 
+/* s_iconv or oconv */
+static int (*iconv)PROTO((int c2,int c1,int c0)) = no_connection2;   
+
+static void (*o_zconv)PROTO((int c2,int c1)) = no_connection; 
+static void (*o_fconv)PROTO((int c2,int c1)) = no_connection; 
+static void (*o_crconv)PROTO((int c2,int c1)) = no_connection; 
+static void (*o_rot_conv)PROTO((int c2,int c1)) = no_connection; 
+static void (*o_hira_conv)PROTO((int c2,int c1)) = no_connection; 
+static void (*o_base64conv)PROTO((int c2,int c1)) = no_connection;
+static void (*o_iso2022jp_check_conv)PROTO((int c2,int c1)) = no_connection;
+
+/* static redirections */
+
+static  void   (*o_putc)PROTO((int c)) = std_putc;
+
+static  int    (*i_getc)PROTO((FILE *f)) = std_getc; /* general input */
+static  int    (*i_ungetc)PROTO((int c,FILE *f)) =std_ungetc;
+
+static  int    (*i_bgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
+static  int    (*i_bungetc)PROTO((int c ,FILE *f)) = std_ungetc;
+
+static  void   (*o_mputc)PROTO((int c)) = std_putc ; /* output of mputc */
+
+static  int    (*i_mgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
+static  int    (*i_mungetc)PROTO((int c ,FILE *f)) = std_ungetc;
+
+/* for strict mime */
+static  int    (*i_mgetc_buf)PROTO((FILE *)) = std_getc; /* input of mgetc_buf */
+static  int    (*i_mungetc_buf)PROTO((int c,FILE *f)) = std_ungetc;
+
+/* Global states */
+static int output_mode = ASCII,    /* output kanji mode */
+           input_mode =  ASCII,    /* input kanji mode */
+           shift_mode =  FALSE;    /* TRUE shift out, or X0201  */
+static int mime_decode_mode =   FALSE;    /* MIME mode B base64, Q hex */
+
+/* X0201 / X0208 conversion tables */
+
+/* X0201 kana conversion table */
+/* 90-9F A0-DF */
+static
+unsigned char cv[]= {
+    0x21,0x21,0x21,0x23,0x21,0x56,0x21,0x57,
+    0x21,0x22,0x21,0x26,0x25,0x72,0x25,0x21,
+    0x25,0x23,0x25,0x25,0x25,0x27,0x25,0x29,
+    0x25,0x63,0x25,0x65,0x25,0x67,0x25,0x43,
+    0x21,0x3c,0x25,0x22,0x25,0x24,0x25,0x26,
+    0x25,0x28,0x25,0x2a,0x25,0x2b,0x25,0x2d,
+    0x25,0x2f,0x25,0x31,0x25,0x33,0x25,0x35,
+    0x25,0x37,0x25,0x39,0x25,0x3b,0x25,0x3d,
+    0x25,0x3f,0x25,0x41,0x25,0x44,0x25,0x46,
+    0x25,0x48,0x25,0x4a,0x25,0x4b,0x25,0x4c,
+    0x25,0x4d,0x25,0x4e,0x25,0x4f,0x25,0x52,
+    0x25,0x55,0x25,0x58,0x25,0x5b,0x25,0x5e,
+    0x25,0x5f,0x25,0x60,0x25,0x61,0x25,0x62,
+    0x25,0x64,0x25,0x66,0x25,0x68,0x25,0x69,
+    0x25,0x6a,0x25,0x6b,0x25,0x6c,0x25,0x6d,
+    0x25,0x6f,0x25,0x73,0x21,0x2b,0x21,0x2c,
+    0x00,0x00};
+
+
+/* X0201 kana conversion table for daguten */
+/* 90-9F A0-DF */
+static
+unsigned char dv[]= { 
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x74,
+    0x00,0x00,0x00,0x00,0x25,0x2c,0x25,0x2e,
+    0x25,0x30,0x25,0x32,0x25,0x34,0x25,0x36,
+    0x25,0x38,0x25,0x3a,0x25,0x3c,0x25,0x3e,
+    0x25,0x40,0x25,0x42,0x25,0x45,0x25,0x47,
+    0x25,0x49,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x25,0x50,0x25,0x53,
+    0x25,0x56,0x25,0x59,0x25,0x5c,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00};
+
+/* X0201 kana conversion table for han-daguten */
+/* 90-9F A0-DF */
+static
+unsigned char ev[]= { 
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x25,0x51,0x25,0x54,
+    0x25,0x57,0x25,0x5a,0x25,0x5d,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00};
+
+
+/* X0208 kigou conversion table */
+/* 0x8140 - 0x819e */
+static
+unsigned char fv[] = {
+
+    0x00,0x00,0x00,0x00,0x2c,0x2e,0x00,0x3a,
+    0x3b,0x3f,0x21,0x00,0x00,0x27,0x60,0x00,
+    0x5e,0x00,0x5f,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x2d,0x00,0x2f,
+    0x5c,0x00,0x00,0x7c,0x00,0x00,0x60,0x27,
+    0x22,0x22,0x28,0x29,0x00,0x00,0x5b,0x5d,
+    0x7b,0x7d,0x3c,0x3e,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x2b,0x2d,0x00,0x00,
+    0x00,0x3d,0x00,0x3c,0x3e,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x24,0x00,0x00,0x25,0x23,0x26,0x2a,0x40,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+} ;
+
+
+#define    CRLF      1
+
+static int             file_out = FALSE;
+#ifdef OVERWRITE
+static int             overwrite = FALSE;
+#endif
+
+static int             crmode_f = 0;   /* CR, NL, CRLF */
+#ifdef EASYWIN /*Easy Win */
+static int             end_check;
+#endif /*Easy Win */
+
+#ifndef PERL_XS
+int
+main(argc, argv)
+    int             argc;
+    char          **argv;
+{
+    FILE  *fin;
+    unsigned char  *cp;
+
+#ifdef EASYWIN /*Easy Win */
+    _BufferSize.y = 400;/*Set Scroll Buffer Size*/
+#endif
+
+    for (argc--,argv++; (argc > 0) && **argv == '-'; argc--, argv++) {
+        cp = *argv;
+        options(cp);
+    }
+    if(x0201_f == WISH_TRUE)
+         x0201_f = ((!iso2022jp_f)? TRUE : NO_X0201);
+
+    if (binmode_f == TRUE)
+#ifdef __OS2__
+    if (freopen("","wb",stdout) == NULL) 
+        return (-1);
+#else
+    setbinmode(stdout);
+#endif
+
+    if (unbuf_f)
+      setbuf(stdout, (char *) NULL);
+    else
+      setvbuffer(stdout, stdobuf, IOBUF_SIZE);
+
+    if (argc == 0) {
+      if (binmode_f == TRUE)
+#ifdef __OS2__
+      if (freopen("","rb",stdin) == NULL) return (-1);
+#else
+      setbinmode(stdin);
+#endif
+      setvbuffer(stdin, stdibuf, IOBUF_SIZE);
+      if (nop_f)
+          noconvert(stdin);
+      else
+          kanji_convert(stdin);
+    } else {
+      while (argc--) {
+          char *outfname;
+         char *origfname;
+
+          if ((fin = fopen((origfname = *argv++), "r")) == NULL) {
+              perror(*--argv);
+              return(-1);
+          } else {
+#ifdef OVERWRITE
+              int fd;
+              int fd_backup;
+#endif
+
+/* reopen file for stdout */
+              if (file_out == TRUE) {
+#ifdef OVERWRITE
+                  if (overwrite){
+                      outfname = malloc(strlen(origfname)
+                                        + strlen(".nkftmpXXXXXX")
+                                        + 1);
+                      if (!outfname){
+                          perror(origfname);
+                          return -1;
+                      }
+                      strcpy(outfname, origfname);
+#ifdef MSDOS
+                      {
+                          int i;
+                          for (i = strlen(outfname); i; --i){
+                              if (outfname[i - 1] == '/'
+                                  || outfname[i - 1] == '\\'){
+                                  break;
+                              }
+                          }
+                          outfname[i] = '\0';
+                      }
+                      strcat(outfname, "ntXXXXXX");
+                      mktemp(outfname);
+                      fd = open(outfname, O_WRONLY | O_CREAT | O_TRUNC,
+                                S_IREAD | S_IWRITE);
+#else
+                      strcat(outfname, ".nkftmpXXXXXX");
+                      fd = mkstemp(outfname);
+#endif
+                      if (fd < 0
+                          || (fd_backup = dup(fileno(stdout))) < 0
+                          || dup2(fd, fileno(stdout)) < 0
+                          ){
+                          perror(origfname);
+                          return -1;
+                      }
+                  }else
+#endif
+                 if(argc == 1 ) {
+                     outfname = *argv++;
+                     argc--;
+                 } else {
+                     outfname = "nkf.out";
+                 }
+
+                 if(freopen(outfname, "w", stdout) == NULL) {
+                     perror (outfname);
+                     return (-1);
+                 }
+                  if (binmode_f == TRUE) {
+#ifdef __OS2__
+                      if (freopen("","wb",stdout) == NULL) 
+                           return (-1);
+#else
+                      setbinmode(stdout);
+#endif
+                  }
+              }
+              if (binmode_f == TRUE)
+#ifdef __OS2__
+                 if (freopen("","rb",fin) == NULL) 
+                    return (-1);
+#else
+                 setbinmode(fin);
+#endif 
+              setvbuffer(fin, stdibuf, IOBUF_SIZE);
+              if (nop_f)
+                  noconvert(fin);
+              else
+                  kanji_convert(fin);
+              fclose(fin);
+#ifdef OVERWRITE
+              if (overwrite) {
+                  struct stat     sb;
+#ifdef MSDOS
+                  time_t tb[2];
+#else
+                  struct utimbuf  tb;
+#endif
+
+                  fflush(stdout);
+                  close(fd);
+                  if (dup2(fd_backup, fileno(stdout)) < 0){
+                      perror("dup2");
+                  }
+                  if (stat(origfname, &sb)) {
+                      fprintf(stderr, "Can't stat %s\n", origfname);
+                  }
+                  /* \e$B%Q!<%_%C%7%g%s$rI|85\e(B */
+                  if (chmod(outfname, sb.st_mode)) {
+                      fprintf(stderr, "Can't set permission %s\n", outfname);
+                  }
+#ifdef MSDOS
+                  tb[0] = tb[1] = sb.st_mtime;
+                  /* \e$B%?%$%`%9%?%s%W$rI|85\e(B */
+                  if (utime(outfname, tb)) {
+                      fprintf(stderr, "Can't set timestamp %s\n", outfname);
+                  }
+
+                  if (unlink(origfname)){
+                      perror(origfname);
+                  }
+#else
+                  tb.actime  = sb.st_atime;
+                  tb.modtime = sb.st_mtime;
+                  /* \e$B%?%$%`%9%?%s%W$rI|85\e(B */
+                  if (utime(outfname, &tb)) {
+                      fprintf(stderr, "Can't set timestamp %s\n", outfname);
+                  }
+#endif
+                  if (rename(outfname, origfname)) {
+                      perror(origfname);
+                      fprintf(stderr, "Can't rename %s to %s\n",
+                              outfname, origfname);
+                  }
+                  free(outfname);
+              }
+#endif
+          }
+      }
+    }
+#ifdef EASYWIN /*Easy Win */
+    if (file_out == FALSE) 
+        scanf("%d",&end_check);
+    else 
+        fclose(stdout);
+#else /* for Other OS */
+    if (file_out == TRUE) 
+        fclose(stdout);
+#endif 
+    return (0);
+}
+#endif
+
+static 
+struct {
+    unsigned char *name;
+    unsigned char *alias;
+} long_option[] = {
+    {"base64","jMB"},
+    {"euc","e"},
+    {"euc-input","E"},
+    {"fj","jm"},
+    {"help","v"},
+    {"jis","j"},
+    {"jis-input","J"},
+    {"mac","sLm"},
+    {"mime","jM"},
+    {"mime-input","m"},
+    {"msdos","sLw"},
+    {"sjis","s"},
+    {"sjis-input","S"},
+    {"unix","eLu"},
+    {"version","V"},
+    {"windows","sLw"},
+    {"hiragana","h1"},
+    {"katakana","h2"},
+    {"katakana-hiragana","h3"},
+#ifdef UTF8_OUTPUT_ENABLE
+    {"utf8", "w"},
+    {"utf16", "w16"},
+#endif
+#ifdef UTF8_INPUT_ENABLE
+    {"utf8-input", "W"},
+    {"utf16-input", "W16"},
+#endif
+#ifdef CAP_URL_OPTION
+    {"cap-input", "\0"},
+    {"url-input", "\0"},
+#endif
+#ifdef CHECK_OPTION
+    {"no-output", "\0"},
+    {"debug", "\0"},
+#endif
+};
+
+static int option_mode;
+
+void
+options(unsigned char *cp) 
+{
+    int i;
+    unsigned char *p;
+
+    if (option_mode==1)
+       return;
+    if (*cp++ != '-') 
+       return;
+    while (*cp) {
+        switch (*cp++) {
+        case '-':  /* literal options */
+           if (!*cp) {        /* ignore the rest of arguments */
+               option_mode = 1;
+               return;
+           }
+            for (i=0;i<sizeof(long_option)/sizeof(long_option[0]);i++) {
+               int j;
+                p = long_option[i].name;
+                for (j=0;*p && *p++ == cp[j];j++);
+                if (! *p && !cp[j]) break;
+            }
+           if (*p) return;
+            cp = long_option[i].alias;
+            if (!*cp){
+#ifdef CAP_URL_OPTION
+                if (strcmp(long_option[i].name, "cap-input") == 0){
+                    cap_f = TRUE;
+                    continue;
+                }
+                if (strcmp(long_option[i].name, "url-input") == 0){
+                    url_f = TRUE;
+                    continue;
+                }
+#endif
+#ifdef CHECK_OPTION
+                if (strcmp(long_option[i].name, "no-output") == 0){
+                    noout_f = TRUE;
+                    continue;
+                }
+                if (strcmp(long_option[i].name, "debug") == 0){
+                    debug_f = TRUE;
+                    continue;
+                }
+#endif
+            }
+            continue;
+        case 'b':           /* buffered mode */
+            unbuf_f = FALSE;
+            continue;
+        case 'u':           /* non bufferd mode */
+            unbuf_f = TRUE;
+            continue;
+        case 't':           /* transparent mode */
+            nop_f = TRUE;
+            continue;
+        case 'j':           /* JIS output */
+        case 'n':
+            output_conv = j_oconv;
+            continue;
+        case 'e':           /* AT&T EUC output */
+            output_conv = e_oconv;
+            continue;
+        case 's':           /* SJIS output */
+            output_conv = s_oconv;
+            continue;
+        case 'l':           /* ISO8859 Latin-1 support, no conversion */
+            iso8859_f = TRUE;  /* Only compatible with ISO-2022-JP */
+            input_f = LATIN1_INPUT;
+            continue;
+        case 'i':           /* Kanji IN ESC-$-@/B */
+            if (*cp=='@'||*cp=='B') 
+                kanji_intro = *cp++;
+            continue;
+        case 'o':           /* ASCII IN ESC-(-J/B */
+            if (*cp=='J'||*cp=='B'||*cp=='H') 
+                ascii_intro = *cp++;
+            continue;
+        case 'h':
+            /*  
+                bit:1   hira -> kata
+                bit:2   kata -> hira
+            */
+            if ('9'>= *cp && *cp>='0') 
+                hira_f |= (*cp++ -'0');
+            else 
+                hira_f |= 1;
+            continue;
+        case 'r':
+            rot_f = TRUE;
+            continue;
+#if defined(MSDOS) || defined(__OS2__) 
+        case 'T':
+            binmode_f = FALSE;
+            continue;
+#endif
+#ifndef PERL_XS
+        case 'V':
+            version();
+            exit(1);
+            break;
+        case 'v':
+            usage();
+            exit(1);
+            break;
+#endif
+#ifdef UTF8_OUTPUT_ENABLE
+        case 'w':           /* UTF-8 output */
+            if ('1'== cp[0] && '6'==cp[1]) {
+               output_conv = w_oconv16; cp+=2;
+               if (cp[0]=='L') {
+                   w_oconv16_begin_f=2; cp++;
+               }
+           } else          
+               output_conv = w_oconv;
+            continue;
+#endif
+#ifdef UTF8_INPUT_ENABLE
+        case 'W':           /* UTF-8 input */
+            if ('1'== cp[0] && '6'==cp[1]) {
+               input_f = UTF16_INPUT;
+           } else
+               input_f = UTF8_INPUT;
+            continue;
+#endif
+        /* Input code assumption */
+        case 'J':   /* JIS input */
+        case 'E':   /* AT&T EUC input */
+            input_f = JIS_INPUT;
+            continue;
+        case 'S':   /* MS Kanji input */
+            input_f = SJIS_INPUT;
+            if (x0201_f==NO_X0201) x0201_f=TRUE;
+            continue;
+        case 'Z':   /* Convert X0208 alphabet to asii */
+            /*  bit:0   Convert X0208
+                bit:1   Convert Kankaku to one space
+                bit:2   Convert Kankaku to two spaces
+                bit:3   Convert HTML Entity
+            */
+            if ('9'>= *cp && *cp>='0') 
+                alpha_f |= 1<<(*cp++ -'0');
+            else 
+                alpha_f |= TRUE;
+            continue;
+        case 'x':   /* Convert X0201 kana to X0208 or X0201 Conversion */
+            x0201_f = FALSE;    /* No X0201->X0208 conversion */
+            /* accept  X0201
+                    ESC-(-I     in JIS, EUC, MS Kanji
+                    SI/SO       in JIS, EUC, MS Kanji
+                    SSO         in EUC, JIS, not in MS Kanji
+                    MS Kanji (0xa0-0xdf) 
+               output  X0201
+                    ESC-(-I     in JIS (0x20-0x5f)
+                    SSO         in EUC (0xa0-0xdf)
+                    0xa0-0xd    in MS Kanji (0xa0-0xdf) 
+            */
+            continue;
+        case 'X':   /* Assume X0201 kana */
+            /* Default value is NO_X0201 for EUC/MS-Kanji mix */
+            x0201_f = TRUE;
+            continue;
+        case 'F':   /* prserve new lines */
+           fold_preserve_f = TRUE;
+        case 'f':   /* folding -f60 or -f */
+            fold_f = TRUE;
+            fold_len = 0;
+            while('0'<= *cp && *cp <='9') { /* we don't use atoi here */
+               fold_len *= 10;
+               fold_len += *cp++ - '0';
+           }
+            if (!(0<fold_len && fold_len<BUFSIZ)) 
+                fold_len = DEFAULT_FOLD;
+           if (*cp=='-') {
+               fold_margin = 0;
+               cp++;
+               while('0'<= *cp && *cp <='9') { /* we don't use atoi here */
+                   fold_margin *= 10;
+                   fold_margin += *cp++ - '0';
+               }
+           }
+            continue;
+        case 'm':   /* MIME support */
+            if (*cp=='B'||*cp=='Q') {
+                mime_decode_mode = *cp++;
+                mimebuf_f = FIXED_MIME;
+            } else if (*cp=='N') {
+                mime_f = TRUE; cp++;
+            } else if (*cp=='S') {
+                mime_f = STRICT_MIME; cp++;
+            } else if (*cp=='0') {
+                mime_f = FALSE;
+            }
+            continue;
+        case 'M':   /* MIME output */
+            if (*cp=='B') {
+                mimeout_mode = 'B';
+                mimeout_f = FIXED_MIME; cp++;
+            } else if (*cp=='Q') {
+                mimeout_mode = 'Q';
+                mimeout_f = FIXED_MIME; cp++;
+            } else {
+               mimeout_f = TRUE;
+           }
+            continue;
+        case 'B':   /* Broken JIS support */
+            /*  bit:0   no ESC JIS
+                bit:1   allow any x on ESC-(-x or ESC-$-x
+                bit:2   reset to ascii on NL
+            */
+            if ('9'>= *cp && *cp>='0') 
+                broken_f |= 1<<(*cp++ -'0');
+            else 
+                broken_f |= TRUE;
+            continue;
+#ifndef PERL_XS
+        case 'O':/* for Output file */
+            file_out = TRUE;
+#ifdef OVERWRITE
+           if (*cp=='W') {
+               overwrite = TRUE;
+               cp++;
+           }
+#endif
+            continue;
+#endif
+        case 'c':/* add cr code */
+            crmode_f = CRLF;
+            continue;
+        case 'd':/* delete cr code */
+            crmode_f = NL;
+            continue;
+        case 'I':   /* ISO-2022-JP output */
+            iso2022jp_f = TRUE;
+            continue;
+        case 'L':  /* line mode */
+            if (*cp=='u') {         /* unix */
+                crmode_f = NL;
+            } else if (*cp=='m') { /* mac */
+                crmode_f = CR;
+            } else if (*cp=='w') { /* windows */
+                crmode_f = CRLF;
+            } else if (*cp=='0') { /* no conversion  */
+                crmode_f = 0;
+            }
+            continue;
+        case ' ':    
+        /* module muliple options in a string are allowed for Perl moudle  */
+           while(*cp && *cp!='-') cp++;
+            if(*cp=='-') cp++;
+            continue;
+        default:
+            /* bogus option but ignored */
+            continue;
+        }
+    }
+}
+
+void set_iconv(int f, int (*iconv_func)(int c2,int c1,int c0)){
+#ifdef CHECK_OPTION
+    static int (*iconv_for_check)() = 0;
+#endif
+#ifdef INPUT_CODE_FIX
+    if (f || !input_f)
+#endif
+        if (estab_f != f){
+            estab_f = f;
+        }
+
+    if (iconv_func
+#ifdef INPUT_CODE_FIX
+        && (f == -TRUE || !input_f) /* -TRUE means "FORCE" */
+#endif
+        ){
+        iconv = iconv_func;
+    }
+#ifdef CHECK_OPTION
+    if (estab_f && iconv_for_check != iconv){
+#ifdef UTF8_INPUT_ENABLE
+        if (iconv == w_iconv) debug("UTF-8\n");
+        if (iconv == w_iconv16) debug("UTF-16\n");
+#endif
+        if (iconv == s_iconv) debug("Shift_JIS\n");
+        if (iconv == e_iconv) debug("EUC-JP\n");
+        iconv_for_check = iconv;
+    }
+#endif
+}
+
+void code_status(int c){
+    switch (s_stat){
+      case -1:
+          if (c <= DEL && estab_f){
+              s_stat = 0;
+          }
+          break;
+      case 0:
+          if (c <= DEL
+              || (0xa1 <= c && c <= 0xef && iconv == s_iconv)){
+              break;
+          }else if ((0x81 <= c && c < 0xa0) || (0xe0 <= c && c <= 0xea)){
+              s_stat = 1;
+          }else{
+              s_stat = -1;
+              if (iconv == s_iconv) set_iconv(FALSE, 0);
+          }
+          break;
+      case 1:
+          if ((0x40 <= c && c <= 0x7e) || (0x80 <= c && c <= 0xfd)){
+              s_stat = 0;
+          }else{
+              s_stat = -1;
+              if (iconv == s_iconv) set_iconv(FALSE, 0);
+          }
+          break;
+    }
+    switch (e_stat){
+      case -1:
+          if (c <= DEL && estab_f){
+              e_stat = 0;
+          }
+          break;
+      case 0:
+          if (c <= DEL){
+              break;
+          }else if (SSO == c || (0xa1 <= c && c <= 0xfe)){
+              e_stat = 1;
+          }else{
+              e_stat = -1;
+              if (iconv == e_iconv) set_iconv(FALSE, 0);
+          }
+          break;
+      case 1:
+          if (0xa1 <= c && c <= 0xfe){
+              e_stat = 0;
+          }else{
+              e_stat = -1;
+              if (iconv == e_iconv) set_iconv(FALSE, 0);
+          }
+          break;
+    }
+#ifdef UTF8_INPUT_ENABLE
+    switch (w_stat){
+      case -1:
+          if (c <= DEL && estab_f){
+              w_stat = 0;
+          }
+          break;
+      case 0:
+          if (c <= DEL){
+              break;
+          }else if (0xc0 <= c && c <= 0xdf){
+              w_stat = 1;
+          }else if (0xe0 <= c && c <= 0xef){
+              w_stat = 2;
+          }else{
+              w_stat = -1;
+              if (iconv == w_iconv) set_iconv(FALSE, 0);
+          }
+          break;
+      case 1:
+      case 2:
+          if (0x80 <= c && c <= 0xbf){
+              --w_stat;
+          }else{
+              w_stat = -1;
+              if (iconv == w_iconv) set_iconv(FALSE, 0);
+          }
+          break;
+    }
+
+    if (s_stat < 0 && e_stat < 0 && w_stat == 0){
+        set_iconv(TRUE, w_iconv);
+    }
+#endif
+    if (s_stat == 0 && e_stat < 0 && w_stat < 0){
+        set_iconv(TRUE, s_iconv);
+    }
+    if (s_stat < 0 && e_stat == 0 && w_stat < 0){
+        set_iconv(TRUE, e_iconv);
+    }
+    if (s_stat < 0 && e_stat < 0 && w_stat < 0){
+        if (c <= DEL){
+            s_stat = e_stat = 0;
+#ifdef UTF8_INPUT_ENABLE
+            w_stat = 0;
+#endif
+        }
+    }
+}
+
+int 
+std_getc(f)
+FILE *f;
+{
+    return getc(f);
+}
+
+int 
+std_ungetc(c,f)
+int c;
+FILE *f;
+{
+    return ungetc(c,f);
+}
+
+void 
+std_putc(c)
+int c;
+{
+    putchar(c);
+}
+
+int
+noconvert(f)
+    FILE  *f;
+{
+    int    c;
+
+    while ((c = (*i_getc)(f)) != EOF)
+      (*o_putc)(c);
+    return 1;
+}
+
+
+void
+module_connection()
+{
+    oconv = output_conv; 
+    o_putc = std_putc;
+
+    /* replace continucation module, from output side */
+
+    /* output redicrection */
+#ifdef CHECK_OPTION
+    if (noout_f){
+        o_putc = no_putc;
+    }
+#endif
+    if (mimeout_f) {
+       o_mputc = o_putc;
+       o_putc = mime_putc;
+       if (mimeout_f == TRUE) {
+           o_base64conv = oconv; oconv = base64_conv;
+       }
+       /* base64_count = 0; */
+    }
+
+    if (crmode_f) {
+       o_crconv = oconv; oconv = cr_conv;
+    }
+    if (rot_f) {
+       o_rot_conv = oconv; oconv = rot_conv;
+    }
+    if (iso2022jp_f) {
+       o_iso2022jp_check_conv = oconv; oconv = iso2022jp_check_conv;
+    }
+    if (hira_f) {
+       o_hira_conv = oconv; oconv = hira_conv;
+    }
+    if (fold_f) {
+       o_fconv = oconv; oconv = fold_conv;
+       f_line = 0;
+    }
+    if (alpha_f || x0201_f) {
+       o_zconv = oconv; oconv = z_conv;
+    }
+
+    i_getc = std_getc;
+    /* input redicrection */
+#ifdef CAP_URL_OPTION
+    if (cap_f){
+        i_cgetc = i_getc; i_getc = cap_getc;
+        i_cungetc = i_ungetc; i_ungetc= cap_ungetc;
+    }
+    if (url_f){
+        i_ugetc = i_getc; i_getc = url_getc;
+        i_uungetc = i_ungetc; i_ungetc= url_ungetc;
+    }
+#endif
+    if (mime_f && mimebuf_f==FIXED_MIME) {
+       i_mgetc = i_getc; i_getc = mime_getc;
+       i_mungetc = i_ungetc; i_ungetc = mime_ungetc;
+    }
+    if (broken_f & 1) {
+       i_bgetc = i_getc; i_getc = broken_getc;
+       i_bungetc = i_ungetc; i_ungetc = broken_ungetc;
+    }
+    if (input_f == JIS_INPUT || input_f == LATIN1_INPUT) {
+        set_iconv(-TRUE, e_iconv);
+    } else if (input_f == SJIS_INPUT) {
+        set_iconv(-TRUE, s_iconv);
+#ifdef UTF8_INPUT_ENABLE
+    } else if (input_f == UTF8_INPUT) {
+        set_iconv(-TRUE, w_iconv);
+    } else if (input_f == UTF16_INPUT) {
+        set_iconv(-TRUE, w_iconv16);
+#endif
+    } else {
+        set_iconv(FALSE, e_iconv);
+    }
+
+    e_stat = 0;
+    s_stat = 0;
+#ifdef UTF8_INPUT_ENABLE
+    w_stat = 0;
+#else
+    w_stat = -1;
+#endif
+}
+
+/*
+   Conversion main loop. Code detection only. 
+ */
+
+int
+kanji_convert(f)
+    FILE  *f;
+{
+    int    c1,
+                    c2;
+
+    module_connection();
+    c2 = 0;
+
+
+    input_mode = ASCII;
+    output_mode = ASCII;
+    shift_mode = FALSE;
+
+#define NEXT continue      /* no output, get next */
+#define SEND ;             /* output c1 and c2, get next */
+#define LAST break         /* end of loop, go closing  */
+
+    while ((c1 = (*i_getc)(f)) != EOF) {
+        code_status(c1);
+        if (c2) {
+            /* second byte */
+            if (c2 > DEL) {
+                /* in case of 8th bit is on */
+                if (!estab_f) {
+                    /* in case of not established yet */
+                    /* It is still ambiguious */
+                    if (h_conv(f, c2, c1)==EOF) 
+                        LAST;
+                    else 
+                        c2 = 0;
+                    NEXT;
+                } else
+                    /* in case of already established */
+                    if (c1 < AT) {
+                        /* ignore bogus code */
+                        c2 = 0;
+                        NEXT;
+                    } else
+                        SEND;
+            } else
+                /* second byte, 7 bit code */
+                /* it might be kanji shitfted */
+                if ((c1 == DEL) || (c1 <= SPACE)) {
+                    /* ignore bogus first code */
+                    c2 = 0;
+                    NEXT;
+                } else
+                    SEND;
+        } else {
+            /* first byte */
+           if (iconv == w_iconv16) {
+               c2 = c1;
+               c1 = (*i_getc)(f);
+               SEND;
+           } else if (c1 > DEL) {
+                /* 8 bit code */
+                if (!estab_f && !iso8859_f) {
+                    /* not established yet */
+                    c2 = c1;
+                    NEXT;
+                } else { /* estab_f==TRUE */
+                    if (iso8859_f) {
+                        c2 = ISO8859_1;
+                        c1 &= 0x7f;
+                        SEND;
+                    } else if (SSP<=c1 && c1<0xe0 && iconv == s_iconv) {
+                        /* SJIS X0201 Case... */
+                        if(iso2022jp_f && x0201_f==NO_X0201) {
+                            (*oconv)(GETA1, GETA2);
+                            NEXT;
+                        } else {
+                           c2 = X0201;
+                           c1 &= 0x7f;
+                           SEND;
+                       }
+                    } else if (c1==SSO && iconv != s_iconv) {
+                        /* EUC X0201 Case */
+                        c1 = (*i_getc)(f);  /* skip SSO */
+                        code_status(c1);
+                        if (SSP<=c1 && c1<0xe0) {
+                           if(iso2022jp_f &&  x0201_f==NO_X0201) {
+                               (*oconv)(GETA1, GETA2);
+                               NEXT;
+                           } else {
+                               c2 = X0201;
+                               c1 &= 0x7f;
+                               SEND;
+                           }
+                        } else  { /* bogus code, skip SSO and one byte */
+                            NEXT;
+                        }
+                    } else {
+                       /* already established */
+                       c2 = c1;
+                       NEXT;
+                    }
+                }
+            } else if ((c1 > SPACE) && (c1 != DEL)) {
+                /* in case of Roman characters */
+                if (shift_mode) { 
+                    /* output 1 shifted byte */
+                    if (iso8859_f) {
+                        c2 = ISO8859_1;
+                        SEND;
+                    } else if (SPACE<=c1 && c1<(0xe0&0x7f) ){
+                      /* output 1 shifted byte */
+                       if(iso2022jp_f && x0201_f==NO_X0201) {
+                           (*oconv)(GETA1, GETA2);
+                           NEXT;
+                       } else {
+                           c2 = X0201;
+                           SEND;
+                       }
+                    } else {
+                        /* look like bogus code */
+                        NEXT;
+                    }
+                } else if (input_mode == X0208) {
+                    /* in case of Kanji shifted */
+                    c2 = c1;
+                    NEXT;
+                } else if (c1 == '=' && mime_f && !mime_decode_mode ) {
+                    /* Check MIME code */
+                    if ((c1 = (*i_getc)(f)) == EOF) {
+                        (*oconv)(0, '=');
+                        LAST;
+                    } else if (c1 == '?') {
+                        /* =? is mime conversion start sequence */
+                       if(mime_f == STRICT_MIME) {
+                           /* check in real detail */
+                           if (mime_begin_strict(f) == EOF) 
+                               LAST;
+                           else
+                               NEXT;
+                       } else if (mime_begin(f) == EOF) 
+                            LAST;
+                        else
+                            NEXT;
+                    } else {
+                        (*oconv)(0, '=');
+                        (*i_ungetc)(c1,f);
+                        NEXT;
+                    }
+                } else {
+                    /* normal ASCII code */ 
+                    SEND;
+                }
+            } else if (c1 == SI) {
+                shift_mode = FALSE; 
+                NEXT;
+            } else if (c1 == SO) {
+                shift_mode = TRUE; 
+                NEXT;
+            } else if (c1 == ESC ) {
+                if ((c1 = (*i_getc)(f)) == EOF) {
+                    /*  (*oconv)(0, ESC); don't send bogus code */
+                    LAST;
+                } else if (c1 == '$') {
+                    if ((c1 = (*i_getc)(f)) == EOF) {
+                        /*
+                        (*oconv)(0, ESC); don't send bogus code 
+                        (*oconv)(0, '$'); */
+                        LAST;
+                    } else if (c1 == '@'|| c1 == 'B') {
+                        /* This is kanji introduction */
+                        input_mode = X0208;
+                        shift_mode = FALSE;
+                        NEXT;
+                    } else if (c1 == '(') {
+                        if ((c1 = (*i_getc)(f)) == EOF) {
+                            /* don't send bogus code 
+                            (*oconv)(0, ESC);
+                            (*oconv)(0, '$');
+                            (*oconv)(0, '(');
+                                */
+                            LAST;
+                        } else if (c1 == '@'|| c1 == 'B') {
+                            /* This is kanji introduction */
+                            input_mode = X0208;
+                            shift_mode = FALSE;
+                            NEXT;
+                        } else {
+                            /* could be some special code */
+                            (*oconv)(0, ESC);
+                            (*oconv)(0, '$');
+                            (*oconv)(0, '(');
+                            (*oconv)(0, c1);
+                            NEXT;
+                        }
+                    } else if (broken_f&0x2) {
+                        /* accept any ESC-(-x as broken code ... */
+                        input_mode = X0208;
+                        shift_mode = FALSE;
+                        NEXT;
+                    } else {
+                        (*oconv)(0, ESC);
+                        (*oconv)(0, '$');
+                        (*oconv)(0, c1);
+                        NEXT;
+                    }
+                } else if (c1 == '(') {
+                    if ((c1 = (*i_getc)(f)) == EOF) {
+                        /* don't send bogus code 
+                        (*oconv)(0, ESC);
+                        (*oconv)(0, '('); */
+                        LAST;
+                    } else {
+                        if (c1 == 'I') {
+                            /* This is X0201 kana introduction */
+                            input_mode = X0201; shift_mode = X0201;
+                            NEXT;
+                        } else if (c1 == 'B' || c1 == 'J' || c1 == 'H') {
+                            /* This is X0208 kanji introduction */
+                            input_mode = ASCII; shift_mode = FALSE;
+                            NEXT;
+                        } else if (broken_f&0x2) {
+                            input_mode = ASCII; shift_mode = FALSE;
+                            NEXT;
+                        } else {
+                            (*oconv)(0, ESC);
+                            (*oconv)(0, '(');
+                            /* maintain various input_mode here */
+                            SEND;
+                        }
+                    }
+               } else if ( c1 == 'N' || c1 == 'n' ){
+                   /* SS2 */
+                   c1 = (*i_getc)(f);  /* skip SS2 */
+                   if ( SPACE<=c1 && c1 < 0xe0 ) {
+                       c2 = X0201;
+                       SEND;
+                   }
+                } else {
+                    /* lonely ESC  */
+                    (*oconv)(0, ESC);
+                    SEND;
+                }
+            } else if ((c1 == NL || c1 == CR) && broken_f&4) {
+                input_mode = ASCII; set_iconv(FALSE, 0);
+                SEND;
+           } else 
+                SEND;
+        }
+        /* send: */
+        if (input_mode == X0208) 
+            (*oconv)(c2, c1);  /* this is JIS, not SJIS/EUC case */
+        else if (input_mode) 
+            (*oconv)(input_mode, c1);  /* other special case */
+        else if ((*iconv)(c2, c1, 0) < 0){  /* can be EUC/SJIS */
+            int c0 = (*i_getc)(f);
+            if (c0 != EOF){
+                code_status(c0);
+                (*iconv)(c2, c1, c0);
+            }
+        }
+
+        c2 = 0;
+        continue;
+        /* goto next_word */
+    }
+
+    /* epilogue */
+    (*iconv)(EOF, 0, 0);
+    return 1;
+}
+
+int
+h_conv(f, c2, c1)
+    FILE  *f;
+    int    c1,
+                    c2;
+{
+    int    wc,c3;
+
+
+    /** it must NOT be in the kanji shifte sequence      */
+    /** it must NOT be written in JIS7                   */
+    /** and it must be after 2 byte 8bit code            */
+
+    hold_count = 0;
+    push_hold_buf(c2);
+    push_hold_buf(c1);
+    c2 = 0;
+
+    while ((c1 = (*i_getc)(f)) != EOF) {
+        if (c1 == ESC){
+           (*i_ungetc)(c1,f);
+            break;
+        }
+        code_status(c1);
+        if (push_hold_buf(c1) == EOF || estab_f){
+            break;
+        }
+    }
+
+    /** now,
+     ** 1) EOF is detected, or
+     ** 2) Code is established, or
+     ** 3) Buffer is FULL (but last word is pushed)
+     **
+     ** in 1) and 3) cases, we continue to use
+     ** Kanji codes by oconv and leave estab_f unchanged.
+     **/
+
+    wc = 0;
+    while (wc < hold_count){
+        c2 = hold_buf[wc++];
+        if (c2 <= DEL){
+            (*iconv)(0, c2, 0);
+            continue;
+        }else if (iconv == s_iconv && 0xa1 <= c2 && c2 <= 0xdf){
+            (*iconv)(X0201, c2, 0);
+            continue;
+        }
+        if (wc < hold_count){
+            c1 = hold_buf[wc++];
+        }else{
+            c1 = (*i_getc)(f);
+            if (c1 == EOF) break;
+            code_status(c1);
+        }
+        if ((*iconv)(c2, c1, 0) < 0){
+            int c0;
+            if (wc < hold_count){
+                c0 = hold_buf[wc++];
+            }else{
+                c0 = (*i_getc)(f);
+                if (c0 == EOF) break;
+                code_status(c0);
+            }
+            (*iconv)(c2, c1, c0);
+            c1 = c0;
+        }
+    }
+    c3=c1;
+    return c3;
+}
+
+
+
+int
+push_hold_buf(c2)
+     int             c2;
+{
+    if (hold_count >= HOLD_SIZE*2)
+        return (EOF);
+    hold_buf[hold_count++] = c2;
+    return ((hold_count >= HOLD_SIZE*2) ? EOF : hold_count);
+}
+
+int
+s_iconv(c2, c1, c0)
+    int    c2,
+                    c1, c0;
+{
+    if (c2 == X0201) {
+       c1 &= 0x7f;
+    } else if ((c2 == EOF) || (c2 == 0) || c2 < SPACE) {
+        /* NOP */
+    } else {
+       c2 = c2 + c2 - ((c2 <= 0x9f) ? SJ0162 : SJ6394);
+       if (c1 < 0x9f)
+           c1 = c1 - ((c1 > DEL) ? SPACE : 0x1f);
+       else {
+           c1 = c1 - 0x7e;
+           c2++;
+       }
+    }
+    (*oconv)(c2, c1);
+    return 0;
+}
+
+int
+e_iconv(c2, c1, c0)
+    int    c2,
+                    c1, c0;
+{
+    if (c2 == X0201) {
+       c1 &= 0x7f;
+    } else if ((c2 == EOF) || (c2 == 0) || c2 < SPACE) {
+        /* NOP */
+    } else {
+        c1 &= 0x7f;
+        c2 &= 0x7f;
+    }
+    (*oconv)(c2, c1);
+    return 0;
+}
+
+#ifdef UTF8_INPUT_ENABLE
+int
+w_iconv(c2, c1, c0)
+    int    c2, c1, c0;
+{
+    extern unsigned short * utf8_to_euc_2bytes[];
+    extern unsigned short ** utf8_to_euc_3bytes[];
+
+    if (0xc0 <= c2 && c2 <= 0xef) {
+        unsigned short **pp;
+
+        if (0xe0 <= c2){
+            if (c0 == 0) return -1;
+           if (!(0<=c2-0x80 && c2-0x80 <sizeof_utf8_to_euc_3bytes)) return -1;
+           pp = utf8_to_euc_3bytes[c2 - 0x80];
+       } else {
+           pp = utf8_to_euc_2bytes;
+           c0 = c1;
+           c1 = c2;
+       }
+       return w_iconv_common(c2, c1, c0,pp);
+    } else if (c2 == X0201) {
+        c1 &= 0x7f;
+    }
+    (*oconv)(c2, c1);
+    return 0;
+}
+
+int
+w_iconv16(c2, c1, c0)
+    int    c2, c1,c0;
+{
+    extern unsigned short * utf8_to_euc_2bytes[];
+    extern unsigned short ** utf8_to_euc_3bytes[];
+    unsigned short **pp;
+    unsigned short val;
+
+    if (c2==0376 && c1==0377){
+       utf16_mode = UTF16_INPUT;
+       return 0;    
+    } else if (c2==0377 && c1==0376){
+       utf16_mode = UTF16BE_INPUT;
+       return 0;    
+    }
+    if (utf16_mode == UTF16BE_INPUT) {
+       int tmp;
+       tmp=c1; c1=c2; c2=tmp;
+    }
+    if (c2==0 || c2==EOF) {
+       (*oconv)(c2, c1);
+       return 0;
+    }
+    val = ((c2<<8)&0xff00) + c1;
+    if (c2 < 0x8){
+       c0 = (0x80 | (c1 & 0x3f));
+       c1 = (0xc0 | (val >> 6));
+       pp = utf8_to_euc_2bytes;
+    }else{
+       c0 = (0x80 | (c1 & 0x3f));
+       c2 = (0xe0 | (val >> 12));
+       c1 = (0x80 | ((val >> 6) & 0x3f));
+       if (c0 == 0) return -1;
+       if (0<=c2-0x80 && c2-0x80 <sizeof_utf8_to_euc_3bytes)
+           pp = utf8_to_euc_3bytes[c2 - 0x80];
+       else 
+           return 0;
+    }
+    return w_iconv_common(c2, c1, c0,pp);
+}
+
+int
+w_iconv_common(c2, c1, c0,pp)
+    int    c2, c1,c0;
+    unsigned short **pp;
+{
+    unsigned short *p ;
+    unsigned short val;
+
+    if (pp == 0) return 1;
+    if (!(0<=c1-0x80 && c1-0x80 <sizeof_utf8_to_euc_C2)) return -1;
+    p = pp[c1 - 0x80];
+    if (p == 0)  return 1;
+    if (!(0<=c0-0x80 && c0-0x80 <sizeof_utf8_to_euc_E5B8)) return -1;
+    val = p[c0 - 0x80];
+    if (val ==0 ) return 1;
+    c2 = val >> 8;
+    if (c2 == SO) c2 = X0201;
+    c1 = val & 0x7f;
+    (*oconv)(c2, c1);
+    return 0;
+}
+
+#endif
+
+#ifdef UTF8_OUTPUT_ENABLE
+int
+e2w_conv(c2, c1)
+    int    c2, c1;
+{
+    extern unsigned short euc_to_utf8_1byte[];
+    extern unsigned short * euc_to_utf8_2bytes[];
+    unsigned short *p;
+
+    if (c2 == X0201) {
+        p = euc_to_utf8_1byte;
+    } else {
+        c2 &= 0x7f;
+        c2 = (c2&0x7f) - 0x21;
+        if (0<=c2 && c2<sizeof_euc_to_utf8_2bytes)
+           p = euc_to_utf8_2bytes[c2];
+       else
+           return 0;
+    }
+    if (!p) return 0;
+    c1 = (c1 & 0x7f) - 0x21;
+    if (0<=c1 && c1<sizeof_euc_to_utf8_1byte)
+       return p[c1];
+}
+
+void
+w_oconv(c2, c1)
+    int    c2,
+                    c1;
+{
+    if (c2 == EOF) {
+        return;
+    } else if (c2 == 0) { 
+       output_mode = ASCII;
+        (*o_putc)(c1);
+    } else if (c2 == ISO8859_1) {
+       output_mode = ISO8859_1;
+        (*o_putc)(c1 | 0x080);
+    } else {
+        unsigned short val = (unsigned short)e2w_conv(c2, c1);
+        output_mode = UTF8;
+
+       if (0 < val && val < 0x80){
+           (*o_putc)(val);
+       }else if (val < 0x800){
+           (*o_putc)(0xc0 | (val >> 6));
+           (*o_putc)(0x80 | (val & 0x3f));
+       }else{
+           (*o_putc)(0xe0 | (val >> 12));
+           (*o_putc)(0x80 | ((val >> 6) & 0x3f));
+           (*o_putc)(0x80 | (val & 0x3f));
+       }
+    }
+}
+
+void
+w_oconv16(c2, c1)
+    int    c2,
+                    c1;
+{
+    
+    if (w_oconv16_begin_f==2) {
+       (*o_putc)('\376');
+       (*o_putc)('\377');
+       w_oconv16_begin_f=1;
+    }
+    if (c2 == EOF) {
+        return;
+    } else if (c2 == 0) { 
+        (*o_putc)(0);
+        (*o_putc)(c1);
+    } else if (c2 == ISO8859_1) {
+        (*o_putc)(0);
+        (*o_putc)(c1 | 0x080);
+    } else {
+        unsigned short val = (unsigned short)e2w_conv(c2, c1);
+        (*o_putc)((val&0xff00)>>8);
+        (*o_putc)(val&0xff);
+    }
+}
+
+#endif
+
+void
+e_oconv(c2, c1)
+    int    c2,
+                    c1;
+{
+    if (c2 == EOF) {
+        return;
+    } else if (c2 == 0) { 
+       output_mode = ASCII;
+        (*o_putc)(c1);
+    } else if (c2 == X0201) {
+       output_mode = JAPANESE_EUC;
+        (*o_putc)(SSO); (*o_putc)(c1|0x80);
+    } else if (c2 == ISO8859_1) {
+       output_mode = ISO8859_1;
+        (*o_putc)(c1 | 0x080);
+    } else {
+        if ((c1<0x20 || 0x7e<c1) ||
+           (c2<0x20 || 0x7e<c2)) {
+            set_iconv(FALSE, 0);
+            return; /* too late to rescue this char */
+        }
+       output_mode = JAPANESE_EUC;
+        (*o_putc)(c2 | 0x080);
+        (*o_putc)(c1 | 0x080);
+    }
+}
+
+
+
+void
+s_oconv(c2, c1)
+    int    c2,
+                    c1;
+{
+    if (c2 == EOF) {
+        return;
+    } else if (c2 == 0) {
+       output_mode = ASCII;
+        (*o_putc)(c1);
+    } else if (c2 == X0201) {
+       output_mode = SHIFT_JIS;
+        (*o_putc)(c1|0x80);
+    } else if (c2 == ISO8859_1) {
+       output_mode = ISO8859_1;
+        (*o_putc)(c1 | 0x080);
+    } else {
+        if ((c1<0x20 || 0x7e<c1) ||
+           (c2<0x20 || 0x7e<c2)) {
+            set_iconv(FALSE, 0);
+            return; /* too late to rescue this char */
+        }
+       output_mode = SHIFT_JIS;
+        (*o_putc)((((c2 - 1) >> 1) + ((c2 <= 0x5e) ? 0x71 : 0xb1)));
+        (*o_putc)((c1 + ((c2 & 1) ? ((c1 < 0x60) ? 0x1f : 0x20) : 0x7e)));
+    }
+}
+
+void
+j_oconv(c2, c1)
+    int    c2,
+                    c1;
+{
+    if (c2 == EOF) {
+        if (output_mode !=ASCII && output_mode!=ISO8859_1) {
+            (*o_putc)(ESC);
+            (*o_putc)('(');
+            (*o_putc)(ascii_intro);
+           output_mode = ASCII;
+        }
+    } else if (c2==X0201) {
+        if (output_mode!=X0201) {
+            output_mode = X0201;
+            (*o_putc)(ESC);
+            (*o_putc)('(');
+            (*o_putc)('I');
+        }
+        (*o_putc)(c1);
+    } else if (c2==ISO8859_1) {
+            /* iso8859 introduction, or 8th bit on */
+            /* Can we convert in 7bit form using ESC-'-'-A ? 
+               Is this popular? */
+       output_mode = ISO8859_1;
+        (*o_putc)(c1|0x80);
+    } else if (c2 == 0) {
+        if (output_mode !=ASCII && output_mode!=ISO8859_1) {
+            (*o_putc)(ESC);
+            (*o_putc)('(');
+            (*o_putc)(ascii_intro);
+            output_mode = ASCII;
+        }
+        (*o_putc)(c1);
+    } else {
+        if (output_mode != X0208) {
+            output_mode = X0208;
+            (*o_putc)(ESC);
+            (*o_putc)('$');
+            (*o_putc)(kanji_intro);
+        }
+        if (c1<0x20 || 0x7e<c1) 
+            return;
+        if (c2<0x20 || 0x7e<c2) 
+            return;
+        (*o_putc)(c2);
+        (*o_putc)(c1);
+    }
+}
+
+void
+base64_conv(c2, c1)
+    int    c2,
+                    c1;
+{
+    if (base64_count>50 && !mimeout_mode && c2==0 && c1==SPACE) {
+       (*o_putc)(NL);
+    } else if (base64_count>66 && mimeout_mode) {
+       (*o_base64conv)(EOF,0);
+       (*o_putc)(NL);
+       (*o_putc)(' ');
+    }
+    (*o_base64conv)(c2,c1);
+}
+
+
+static int broken_buf[3];
+static int broken_counter = 0;
+static int broken_last = 0;
+int
+broken_getc(f)
+FILE *f;
+{
+    int c,c1;
+
+    if (broken_counter>0) {
+       return broken_buf[--broken_counter];
+    }
+    c= (*i_bgetc)(f);
+    if (c=='$' && broken_last != ESC 
+            && (input_mode==ASCII || input_mode==X0201)) {
+       c1= (*i_bgetc)(f);
+       broken_last = 0;
+       if (c1=='@'|| c1=='B') {
+           broken_buf[0]=c1; broken_buf[1]=c; 
+           broken_counter=2;
+           return ESC;
+       } else {
+           (*i_bungetc)(c1,f);
+           return c;
+       }
+    } else if (c=='(' && broken_last != ESC 
+            && (input_mode==X0208 || input_mode==X0201)) { /* ) */
+       c1= (*i_bgetc)(f);
+       broken_last = 0;
+       if (c1=='J'|| c1=='B') {
+           broken_buf[0]=c1; broken_buf[1]=c;
+           broken_counter=2;
+           return ESC;
+       } else {
+           (*i_bungetc)(c1,f);
+           return c;
+       }
+    } else {
+       broken_last = c;
+       return c;
+    }
+}
+
+int
+broken_ungetc(c,f)
+int c;
+FILE *f;
+{
+    if (broken_counter<2)
+       broken_buf[broken_counter++]=c;
+    return c;
+}
+
+static int prev_cr = 0;
+
+void
+cr_conv(c2,c1) 
+int c2,c1;
+{
+    if (prev_cr) {
+       prev_cr = 0;
+       if (! (c2==0&&c1==NL) ) {
+           cr_conv(0,'\n');
+       }
+    }
+    if (c2) {
+        (*o_crconv)(c2,c1);
+    } else if (c1=='\r') {
+       prev_cr = c1;
+    } else if (c1=='\n') {
+        if (crmode_f==CRLF) {
+            (*o_crconv)(0,'\r');
+       } else if (crmode_f==CR) {
+            (*o_crconv)(0,'\r');
+           return;
+       } 
+       (*o_crconv)(0,NL);
+    } else if (c1!='\032' || crmode_f!=NL){
+        (*o_crconv)(c2,c1);
+    }
+}
+
+/* 
+  Return value of fold_conv()
+
+       \n  add newline  and output char
+       \r  add newline  and output nothing
+       ' ' space
+       0   skip  
+       1   (or else) normal output 
+
+  fold state in prev (previous character)
+
+      >0x80 Japanese (X0208/X0201)
+      <0x80 ASCII
+      \n    new line 
+      ' '   space
+
+  This fold algorthm does not preserve heading space in a line.
+  This is the main difference from fmt.
+*/
+
+#define char_size(c2,c1) (c2?2:1)
+
+void
+fold_conv(c2,c1) 
+int c2,c1;
+{ 
+    int prev0;
+    int fold_state=0;
+
+    if (c1== '\r') {
+       fold_state=0;  /* ignroe cr */
+    } else if (c1== BS) {
+        if (f_line>0) f_line--;
+        fold_state =  1;
+    } else if (c2==EOF && f_line != 0) {    /* close open last line */
+            fold_state = '\n';
+    } else if (c1=='\n') {
+        /* new line */
+        if (fold_preserve_f) { 
+                f_line = 0;
+                fold_state =  '\r';
+       } else if (f_prev == c1) {        /* duplicate newline */
+            if (f_line) {
+                f_line = 0;
+                fold_state =  '\n';    /* output two newline */
+            } else {
+                f_line = 0;
+                fold_state =  1;
+            }
+        } else  {
+            if (f_prev&0x80) {     /* Japanese? */
+                f_prev = c1;
+                fold_state =  0;       /* ignore given single newline */
+            } else if (f_prev==' ') {
+                fold_state =  0;
+            } else {
+                f_prev = c1;
+                if (++f_line<=fold_len) 
+                    fold_state =  ' ';
+                else {
+                    f_line = 0;
+                    fold_state =  '\r';        /* fold and output nothing */
+                }
+            }
+        }
+    } else if (c1=='\f') {
+        f_prev = '\n';
+        if (f_line==0)
+            fold_state =  1;
+        f_line = 0;
+        fold_state =  '\n';            /* output newline and clear */
+    } else if ( (c2==0  && c1==' ')||
+               (c2==0  && c1=='\t')||
+               (c2=='!'&& c1=='!')) {
+        /* X0208 kankaku or ascii space */
+            if (f_prev == ' ') {
+                fold_state = 0;         /* remove duplicate spaces */
+            } else {
+                f_prev = ' ';    
+                if (++f_line<=fold_len) 
+                    fold_state = ' ';         /* output ASCII space only */
+                else {
+                    f_prev = ' '; f_line = 0;
+                    fold_state = '\r';        /* fold and output nothing */
+                }
+            }
+    } else {
+        prev0 = f_prev; /* we still need this one... , but almost done */
+        f_prev = c1;
+        if (c2 || c2==X0201) 
+            f_prev |= 0x80;  /* this is Japanese */
+        f_line += char_size(c2,c1);
+        if (f_line<=fold_len) {   /* normal case */
+            fold_state = 1;
+        } else {
+            if (f_line>=fold_len+fold_margin) { /* too many kinsou suspension */
+                f_line = char_size(c2,c1);
+                fold_state =  '\n';       /* We can't wait, do fold now */
+            } else if (c2==X0201) {
+            /* simple kinsoku rules  return 1 means no folding  */
+                if (c1==(0xde&0x7f)) fold_state = 1; /* \e$B!+\e(B*/
+                else if (c1==(0xdf&0x7f)) fold_state = 1; /* \e$B!,\e(B*/
+                else if (c1==(0xa4&0x7f)) fold_state = 1; /* \e$B!#\e(B*/
+                else if (c1==(0xa3&0x7f)) fold_state = 1; /* \e$B!$\e(B*/
+                else if (c1==(0xa1&0x7f)) fold_state = 1; /* \e$B!W\e(B*/
+                else if (c1==(0xb0&0x7f)) fold_state = 1; /* - */
+                else if (SPACE<=c1 && c1<=(0xdf&0x7f)) {      /* X0201 */
+                   f_line = 1;
+                   fold_state = '\n';/* add one new f_line before this character */
+               } else {
+                   f_line = 1;
+                   fold_state = '\n';/* add one new f_line before this character */
+               }
+            } else if (c2==0) {
+                /* kinsoku point in ASCII */ 
+               if (  c1==')'||    /* { [ ( */
+                     c1==']'||
+                     c1=='}'||
+                     c1=='.'||
+                     c1==','||
+                     c1=='!'||
+                     c1=='?'||
+                     c1=='/'||
+                     c1==':'||
+                     c1==';' ) {
+                   fold_state = 1;
+               /* just after special */
+               } else if (!is_alnum(prev0)) {
+                   f_line = char_size(c2,c1);
+                   fold_state = '\n';
+               } else if ((prev0==' ') ||   /* ignored new f_line */
+                      (prev0=='\n')||        /* ignored new f_line */
+                      (prev0&0x80)) {        /* X0208 - ASCII */
+                   f_line = char_size(c2,c1);
+                    fold_state = '\n';/* add one new f_line before this character */
+                } else {
+                    fold_state = 1;  /* default no fold in ASCII */
+                }
+            } else {
+                if (c2=='!') {
+                    if (c1=='"')  fold_state = 1; /* \e$B!"\e(B */
+                    else if (c1=='#')  fold_state = 1; /* \e$B!#\e(B */
+                    else if (c1=='W')  fold_state = 1; /* \e$B!W\e(B */
+                    else if (c1=='K')  fold_state = 1; /* \e$B!K\e(B */
+                    else if (c1=='$')  fold_state = 1; /* \e$B!$\e(B */
+                    else if (c1=='%')  fold_state = 1; /* \e$B!%\e(B */
+                    else if (c1=='\'') fold_state = 1; /* \e$B!\\e(B */
+                    else if (c1=='(')  fold_state = 1; /* \e$B!(\e(B */
+                    else if (c1==')')  fold_state = 1; /* \e$B!)\e(B */
+                    else if (c1=='*')  fold_state = 1; /* \e$B!*\e(B */
+                    else if (c1=='+')  fold_state = 1; /* \e$B!+\e(B */
+                    else if (c1==',')  fold_state = 1; /* \e$B!,\e(B */
+                         /* default no fold in kinsoku */
+                   else { 
+                       fold_state = '\n';
+                       f_line = char_size(c2,c1);
+                       /* add one new f_line before this character */
+                   }
+                } else {
+                   f_line = char_size(c2,c1);
+                    fold_state = '\n'; 
+                    /* add one new f_line before this character */
+                }
+            }
+        }
+    }
+    /* terminator process */
+    switch(fold_state) {
+        case '\n': 
+            (*o_fconv)(0,'\n');
+            (*o_fconv)(c2,c1);
+            break;
+        case 0:    
+            return;
+        case '\r': 
+            (*o_fconv)(0,'\n');
+            break;
+        case '\t': 
+        case ' ': 
+            (*o_fconv)(0,' ');
+            break;
+        default:
+            (*o_fconv)(c2,c1);
+    }
+}
+
+int z_prev2=0,z_prev1=0;
+
+void
+z_conv(c2,c1)
+int c2,c1;
+{
+
+    /* if (c2) c1 &= 0x7f; assertion */
+
+    if (x0201_f && z_prev2==X0201) {  /* X0201 */
+        if (c1==(0xde&0x7f)) { /* \e$BByE@\e(B */
+            z_prev2=0;
+            (*o_zconv)(dv[(z_prev1-SPACE)*2],dv[(z_prev1-SPACE)*2+1]);
+            return;
+        } else if (c1==(0xdf&0x7f)&&ev[(z_prev1-SPACE)*2]) {  /* \e$BH>ByE@\e(B */
+            z_prev2=0;
+            (*o_zconv)(ev[(z_prev1-SPACE)*2],ev[(z_prev1-SPACE)*2+1]);
+            return;
+        } else {
+            z_prev2=0;
+            (*o_zconv)(cv[(z_prev1-SPACE)*2],cv[(z_prev1-SPACE)*2+1]);
+        }
+    }
+
+    if (c2==EOF) {
+        (*o_zconv)(c2,c1);
+        return;
+    }
+
+    if (x0201_f && c2==X0201) {
+        if (dv[(c1-SPACE)*2]||ev[(c1-SPACE)*2]) {
+            /* wait for \e$BByE@\e(B or \e$BH>ByE@\e(B */
+            z_prev1 = c1; z_prev2 = c2;
+            return;
+        } else {
+            (*o_zconv)(cv[(c1-SPACE)*2],cv[(c1-SPACE)*2+1]);
+            return;
+        }
+    }
+
+    /* JISX0208 Alphabet */
+    if (alpha_f && c2 == 0x23 ) {
+        c2 = 0;
+    } else if (alpha_f && c2 == 0x21 ) { 
+    /* JISX0208 Kigou */
+       if (0x21==c1) {
+           if (alpha_f&0x2) {
+               c1 = ' ';
+               c2 = 0;
+           } else if (alpha_f&0x4) {
+                (*o_zconv)(0,' ');
+                (*o_zconv)(0,' ');
+                return;
+           } 
+       } else if (0x20<c1 && c1<0x7f && fv[c1-0x20]) {
+           c1 = fv[c1-0x20];
+           c2 =  0;
+           if (alpha_f&0x8) {
+               char *entity = 0;
+               switch (c1){
+                 case '>': entity = "&gt;"; break;
+                 case '<': entity = "&lt;"; break;
+                 case '\"': entity = "&quot;"; break;
+                 case '&': entity = "&amp;"; break;
+               }
+               if (entity){
+                   while (*entity) (*o_zconv)(0, *entity++);
+                   return;
+               }
+           }
+       } 
+    }
+    (*o_zconv)(c2,c1);
+}
+
+
+#define rot13(c)  ( \
+      ( c < 'A' ) ? c: \
+      (c <= 'M')  ? (c + 13): \
+      (c <= 'Z')  ? (c - 13): \
+      (c < 'a')   ? (c): \
+      (c <= 'm')  ? (c + 13): \
+      (c <= 'z')  ? (c - 13): \
+      (c) \
+)
+
+#define  rot47(c) ( \
+      ( c < '!' ) ? c: \
+      ( c <= 'O' ) ? (c + 47) : \
+      ( c <= '~' ) ?  (c - 47) : \
+      c \
+)
+
+void
+rot_conv(c2,c1)
+int c2,c1;
+{
+    if (c2==0 || c2==X0201 || c2==ISO8859_1) {
+       c1 = rot13(c1);
+    } else if (c2) {
+       c1 = rot47(c1);
+       c2 = rot47(c2);
+    }
+    (*o_rot_conv)(c2,c1);
+}
+
+void
+hira_conv(c2,c1)
+int c2,c1;
+{
+    if ((hira_f & 1) && c2==0x25 && 0x20<c1 && c1<0x74) {
+       c2 = 0x24;
+    } else if ((hira_f & 2) && c2==0x24 && 0x20<c1 && c1<0x74) {
+       c2 = 0x25;
+    } 
+    (*o_hira_conv)(c2,c1);
+}
+
+
+void
+iso2022jp_check_conv(c2,c1)
+int    c2, c1;
+{
+    static int range[RANGE_NUM_MAX][2] = {
+        {0x222f, 0x2239,},
+        {0x2242, 0x2249,},
+        {0x2251, 0x225b,},
+        {0x226b, 0x2271,},
+        {0x227a, 0x227d,},
+        {0x2321, 0x232f,},
+        {0x233a, 0x2340,},
+        {0x235b, 0x2360,},
+        {0x237b, 0x237e,},
+        {0x2474, 0x247e,},
+        {0x2577, 0x257e,},
+        {0x2639, 0x2640,},
+        {0x2659, 0x267e,},
+        {0x2742, 0x2750,},
+        {0x2772, 0x277e,},
+        {0x2841, 0x287e,},
+        {0x4f54, 0x4f7e,},
+        {0x7425, 0x747e},
+    };
+    int i;
+    int start, end, c;
+
+    if(c2 >= 0x00 && c2 <= 0x20 && c1 >= 0x7f && c1 <= 0xff) {
+       c2 = GETA1;
+       c1 = GETA2;
+    }
+    if((c2 >= 0x29 && c2 <= 0x2f) || (c2 >= 0x75 && c2 <= 0x7e)) {
+       c2 = GETA1;
+       c1 = GETA2;
+    }
+
+    for (i = 0; i < RANGE_NUM_MAX; i++) {
+       start = range[i][0];
+       end   = range[i][1];
+       c     = (c2 << 8) + c1;
+       if (c >= start && c <= end) {
+           c2 = GETA1;
+           c1 = GETA2;
+       }
+    }
+    (*o_iso2022jp_check_conv)(c2,c1);
+}
+
+
+/* This converts  =?ISO-2022-JP?B?HOGE HOGE?= */
+
+unsigned char *mime_pattern[] = {
+   (unsigned char *)"\075?EUC-JP?B?",
+   (unsigned char *)"\075?SHIFT_JIS?B?",
+   (unsigned char *)"\075?ISO-8859-1?Q?",
+   (unsigned char *)"\075?ISO-2022-JP?B?",
+   (unsigned char *)"\075?ISO-2022-JP?Q?",
+#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
+   (unsigned char *)"\075?UTF-8?B?",
+#endif
+   NULL
+};
+
+int      mime_encode[] = {
+    JAPANESE_EUC, SHIFT_JIS,ISO8859_1, X0208, X0201,
+#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
+    UTF8,
+#endif
+    0
+};
+
+int      mime_encode_method[] = {
+    'B', 'B','Q', 'B', 'Q',
+#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
+    'B',
+#endif
+    0
+};
+
+
+#define MAXRECOVER 20
+
+/* I don't trust portablity of toupper */
+#define nkf_toupper(c)  (('a'<=c && c<='z')?(c-('a'-'A')):c)
+
+void
+switch_mime_getc()
+{
+    if (i_getc!=mime_getc) {
+       i_mgetc = i_getc; i_getc = mime_getc;
+       i_mungetc = i_ungetc; i_ungetc = mime_ungetc;
+       if(mime_f==STRICT_MIME) {
+           i_mgetc_buf = i_mgetc; i_mgetc = mime_getc_buf;
+           i_mungetc_buf = i_mungetc; i_mungetc = mime_ungetc_buf;
+       }
+    }
+}
+
+void
+unswitch_mime_getc()
+{
+    if(mime_f==STRICT_MIME) {
+       i_mgetc = i_mgetc_buf;
+       i_mungetc = i_mungetc_buf;
+    }
+    i_getc = i_mgetc;
+    i_ungetc = i_mungetc;
+}
+
+int
+mime_begin_strict(f)
+FILE *f;
+{
+    int c1 = 0;
+    int i,j,k;
+    unsigned char *p,*q;
+    int r[MAXRECOVER];    /* recovery buffer, max mime pattern lenght */
+
+    mime_decode_mode = FALSE;
+    /* =? has been checked */
+    j = 0;
+    p = mime_pattern[j];
+    r[0]='='; r[1]='?';
+
+    for(i=2;p[i]>' ';i++) {                   /* start at =? */
+        if ( ((r[i] = c1 = (*i_getc)(f))==EOF) || nkf_toupper(c1) != p[i] ) {
+            /* pattern fails, try next one */
+            q = p;
+            while ((p = mime_pattern[++j])) {
+                for(k=2;k<i;k++)              /* assume length(p) > i */
+                    if (p[k]!=q[k]) break;
+                if (k==i && nkf_toupper(c1)==p[k]) break;
+            }
+            if (p) continue;  /* found next one, continue */
+            /* all fails, output from recovery buffer */
+            (*i_ungetc)(c1,f);
+            for(j=0;j<i;j++) {
+                (*oconv)(0,r[j]);
+            }
+            return c1;
+        }
+    }
+    mime_decode_mode = p[i-2];
+    if (mime_decode_mode=='B') {
+        mimebuf_f = unbuf_f;
+        if (!unbuf_f) {
+            /* do MIME integrity check */
+            return mime_integrity(f,mime_pattern[j]);
+        } 
+    }
+    switch_mime_getc();
+    mimebuf_f = TRUE;
+    return c1;
+}
+
+int
+mime_getc_buf(f) 
+FILE *f;
+{
+    /* we don't keep eof of Fifo, becase it contains ?= as
+       a terminator. It was checked in mime_integrity. */
+    return ((mimebuf_f)?
+        (*i_mgetc_buf)(f):Fifo(mime_input++));
+}
+
+int
+mime_ungetc_buf(c,f) 
+FILE *f;
+int c;
+{
+    if (mimebuf_f)
+       (*i_mungetc_buf)(c,f);
+    else 
+       Fifo(--mime_input)=c;
+    return c;
+}
+
+int
+mime_begin(f)
+FILE *f;
+{
+    int c1;
+    int i,k;
+
+    /* In NONSTRICT mode, only =? is checked. In case of failure, we  */
+    /* re-read and convert again from mime_buffer.  */
+
+    /* =? has been checked */
+    k = mime_last;
+    Fifo(mime_last++)='='; Fifo(mime_last++)='?';
+    for(i=2;i<MAXRECOVER;i++) {                   /* start at =? */
+        /* We accept any character type even if it is breaked by new lines */
+        c1 = (*i_getc)(f); Fifo(mime_last++)= c1 ;
+        if (c1=='\n'||c1==' '||c1=='\r'||
+                c1=='-'||c1=='_'||is_alnum(c1) ) continue;
+        if (c1=='=') {
+            /* Failed. But this could be another MIME preemble */
+            (*i_ungetc)(c1,f);
+            mime_last--;
+            break;
+        }
+        if (c1!='?') break;
+        else {
+            /* c1=='?' */
+            c1 = (*i_getc)(f); Fifo(mime_last++) = c1;
+            if (!(++i<MAXRECOVER) || c1==EOF) break;
+            if (c1=='b'||c1=='B') {
+                mime_decode_mode = 'B';
+            } else if (c1=='q'||c1=='Q') {
+                mime_decode_mode = 'Q';
+            } else {
+                break;
+            }
+            c1 = (*i_getc)(f); Fifo(mime_last++) = c1;
+            if (!(++i<MAXRECOVER) || c1==EOF) break;
+            if (c1!='?') {
+                mime_decode_mode = FALSE;
+            }
+            break;
+        }
+    }
+    switch_mime_getc();
+    if (!mime_decode_mode) {
+        /* false MIME premble, restart from mime_buffer */
+        mime_decode_mode = 1;  /* no decode, but read from the mime_buffer */
+        /* Since we are in MIME mode until buffer becomes empty,    */
+        /* we never go into mime_begin again for a while.           */
+        return c1;
+    }
+    /* discard mime preemble, and goto MIME mode */
+    mime_last = k;
+    /* do no MIME integrity check */
+    return c1;   /* used only for checking EOF */
+}
+
+#ifdef CHECK_OPTION
+void
+no_putc(c)
+     int c;
+{
+    ;
+}
+
+void debug(str)
+     char *str;
+{
+    if (debug_f){
+        fputs(str, stderr);
+    }
+}
+#endif
+
+#ifdef CAP_URL_OPTION
+int
+hex2bin(x)
+     int x;
+{
+    if (isdigit(x)) return x - '0';
+    return nkf_toupper(x) - 'A' + 10;
+}
+
+int
+hex_getc(ch, f, g, u)
+     int ch;
+     FILE *f;
+     int (*g)(FILE *f);
+     int (*u)(int c, FILE *f);
+{
+    int c1, c2, c3;
+    c1 = (*g)(f);
+    if (c1 != ch){
+        return c1;
+    }
+    c2 = (*g)(f);
+    if (!isxdigit(c2) == EOF){
+        (*u)(c2, f);
+        return c1;
+    }
+    c3 = (*g)(f);
+    if (!isxdigit(c3) == EOF){
+        (*u)(c2, f);
+        (*u)(c3, f);
+        return c1;
+    }
+    return (hex2bin(c2) << 4) | hex2bin(c3);
+}
+
+int
+cap_getc(f)
+     FILE *f;
+{
+    return hex_getc(':', f, i_cgetc, i_cungetc);
+}
+
+int
+cap_ungetc(c, f)
+     int c;
+     FILE *f;
+{
+    return (*i_cungetc)(c, f);
+}
+
+int
+url_getc(f)
+     FILE *f;
+{
+    return hex_getc('%', f, i_ugetc, i_uungetc);
+}
+
+int
+url_ungetc(c, f)
+     int c;
+     FILE *f;
+{
+    return (*i_uungetc)(c, f);
+}
+#endif
+
+
+int 
+mime_getc(f)
+FILE *f;
+{
+    int c1, c2, c3, c4, cc;
+    int t1, t2, t3, t4, mode, exit_mode;
+
+    if (mime_top != mime_last) {  /* Something is in FIFO */
+        return  Fifo(mime_top++);
+    }
+    if (mime_decode_mode==1 ||mime_decode_mode==FALSE) {
+       mime_decode_mode=FALSE;
+       unswitch_mime_getc();
+       return (*i_getc)(f);
+    }
+
+    if (mimebuf_f == FIXED_MIME)
+        exit_mode = mime_decode_mode;
+    else
+        exit_mode = FALSE;
+    if (mime_decode_mode == 'Q') {
+        if ((c1 = (*i_mgetc)(f)) == EOF) return (EOF);
+restart_mime_q:
+        if (c1=='_') return ' ';
+        if (c1!='=' && c1!='?') {
+           return c1;
+       }
+                
+        mime_decode_mode = exit_mode; /* prepare for quit */
+        if (c1<=' ') return c1;
+        if ((c2 = (*i_mgetc)(f)) == EOF) return (EOF);
+        if (c1=='?'&&c2=='=' && mimebuf_f != FIXED_MIME) {
+            /* end Q encoding */
+            input_mode = exit_mode;
+            while((c1=(*i_getc)(f))!=EOF && c1==SPACE 
+                        /* && (c1==NL||c1==TAB||c1=='\r') */ ) ;
+            return c1;
+        }
+        if (c1=='='&&c2<' ') { /* this is soft wrap */
+            while((c1 =  (*i_mgetc)(f)) <=' ') {
+               if ((c1 = (*i_mgetc)(f)) == EOF) return (EOF);
+           }
+            mime_decode_mode = 'Q'; /* still in MIME */
+           goto restart_mime_q;
+       }
+        if (c1=='?') {
+            mime_decode_mode = 'Q'; /* still in MIME */
+            (*i_mungetc)(c2,f);
+            return c1;
+        }
+        if ((c3 = (*i_mgetc)(f)) == EOF) return (EOF);
+        if (c2<=' ') return c2;
+        mime_decode_mode = 'Q'; /* still in MIME */
+#define hex(c)   (('0'<=c&&c<='9')?(c-'0'):\
+     ('A'<=c&&c<='F')?(c-'A'+10):('a'<=c&&c<='f')?(c-'a'+10):0)
+        return ((hex(c2)<<4) + hex(c3));
+    }
+
+    if (mime_decode_mode != 'B') {
+        mime_decode_mode = FALSE;
+        return (*i_mgetc)(f);
+    }
+
+
+    /* Base64 encoding */
+    /* 
+        MIME allows line break in the middle of 
+        Base64, but we are very pessimistic in decoding
+        in unbuf mode because MIME encoded code may broken by 
+        less or editor's control sequence (such as ESC-[-K in unbuffered
+        mode. ignore incomplete MIME.
+    */
+    mode = mime_decode_mode;
+    mime_decode_mode = exit_mode;  /* prepare for quit */
+
+    while ((c1 = (*i_mgetc)(f))<=' ') {
+        if (c1==EOF)
+            return (EOF);
+    }
+mime_c2_retry:
+    if ((c2 = (*i_mgetc)(f))<=' ') {
+        if (c2==EOF)
+            return (EOF);
+       if (mime_f != STRICT_MIME) goto mime_c2_retry;
+        if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;  
+        return c2;
+    }
+    if ((c1 == '?') && (c2 == '=')) {
+        input_mode = ASCII;
+        while((c1=(*i_getc)(f))!=EOF && c1==SPACE 
+                    /* && (c1==NL||c1==TAB||c1=='\r') */ ) ;
+        return c1;
+    }
+mime_c3_retry:
+    if ((c3 = (*i_mgetc)(f))<=' ') {
+        if (c3==EOF)
+            return (EOF);
+       if (mime_f != STRICT_MIME) goto mime_c3_retry;
+        if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;  
+        return c3;
+    }
+mime_c4_retry:
+    if ((c4 = (*i_mgetc)(f))<=' ') {
+        if (c4==EOF)
+            return (EOF);
+       if (mime_f != STRICT_MIME) goto mime_c4_retry;
+        if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;  
+        return c4;
+    }
+
+    mime_decode_mode = mode; /* still in MIME sigh... */
+
+    /* BASE 64 decoding */
+
+    t1 = 0x3f & base64decode(c1);
+    t2 = 0x3f & base64decode(c2);
+    t3 = 0x3f & base64decode(c3);
+    t4 = 0x3f & base64decode(c4);
+    cc = ((t1 << 2) & 0x0fc) | ((t2 >> 4) & 0x03);
+    if (c2 != '=') {
+        Fifo(mime_last++) = cc;
+        cc = ((t2 << 4) & 0x0f0) | ((t3 >> 2) & 0x0f);
+        if (c3 != '=') {
+            Fifo(mime_last++) = cc;
+            cc = ((t3 << 6) & 0x0c0) | (t4 & 0x3f);
+            if (c4 != '=') 
+                Fifo(mime_last++) = cc;
+        }
+    } else {
+        return c1;
+    }
+    return  Fifo(mime_top++);
+}
+
+int
+mime_ungetc(c,f) 
+int   c;
+FILE  *f;
+{
+    Fifo(--mime_top) = c;
+    return c;
+}
+
+int
+mime_integrity(f,p)
+FILE *f;
+unsigned char *p;
+{
+    int c,d;
+    unsigned int q;
+    /* In buffered mode, read until =? or NL or buffer full
+     */
+    mime_input = mime_top;
+    mime_last = mime_top;
+    while(*p) Fifo(mime_input++) = *p++;
+    d = 0;
+    q = mime_input;
+    while((c=(*i_getc)(f))!=EOF) {
+        if (((mime_input-mime_top)&MIME_BUF_MASK)==0) {
+           break;   /* buffer full */
+       }
+        if (c=='=' && d=='?') {
+            /* checked. skip header, start decode */
+            Fifo(mime_input++) = c;
+            /* mime_last_input = mime_input; */
+            mime_input = q; 
+           switch_mime_getc();
+            return 1;
+        }
+        if (!( (c=='+'||c=='/'|| c=='=' || c=='?' || is_alnum(c))))
+            break;
+        /* Should we check length mod 4? */
+        Fifo(mime_input++) = c;
+        d=c;
+    }
+    /* In case of Incomplete MIME, no MIME decode  */
+    Fifo(mime_input++) = c;
+    mime_last = mime_input;     /* point undecoded buffer */
+    mime_decode_mode = 1;              /* no decode on Fifo last in mime_getc */
+    switch_mime_getc();         /* anyway we need buffered getc */
+    return 1;
+}
+
+int
+base64decode(c)
+    int            c;
+{
+    int             i;
+    if (c > '@') {
+        if (c < '[') {
+            i = c - 'A';                        /* A..Z 0-25 */
+        } else {
+            i = c - 'G'     /* - 'a' + 26 */ ;  /* a..z 26-51 */
+       }
+    } else if (c > '/') {
+        i = c - '0' + '4'   /* - '0' + 52 */ ;  /* 0..9 52-61 */
+    } else if (c == '+') {
+        i = '>'             /* 62 */ ;          /* +  62 */
+    } else {
+        i = '?'             /* 63 */ ;          /* / 63 */
+    }
+    return (i);
+}
+
+static char basis_64[] =
+   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+static int b64c;
+
+void
+open_mime(mode)
+int mode;
+{
+    char *p;
+    int i;
+    p  = mime_pattern[0];
+    for(i=0;mime_encode[i];i++) {
+       if (mode == mime_encode[i]) {
+           p = mime_pattern[i];
+               break;
+       }
+    }
+    mimeout_mode = mime_encode_method[i];
+           
+    /* (*o_mputc)(' '); */
+    while(*p) {
+        (*o_mputc)(*p++);
+        base64_count ++;
+    }
+}
+
+void
+close_mime()
+{
+    (*o_mputc)('?');
+    (*o_mputc)('=');
+    (*o_mputc)(' ');
+    base64_count += 3;
+    mimeout_mode = 0;
+}
+
+#define itoh4(c)   (c>=10?c+'A'-10:c+'0')
+
+void
+mime_putc(c)
+    int            c;
+{
+    if (mimeout_f==FIXED_MIME) {
+       if (base64_count>71) {
+            (*o_mputc)('\n');
+            base64_count=0;
+        }
+    } else if (c==NL) {
+       base64_count=0;
+    } 
+    if (c!=EOF) {
+        if ( c<=DEL &&(output_mode==ASCII ||output_mode == ISO8859_1 )
+               && mimeout_f!=FIXED_MIME) {
+           if (mimeout_mode=='Q') {
+               if (c<=SPACE) {
+                   close_mime();
+               }
+               (*o_mputc)(c);
+               return;
+           }
+            if (mimeout_mode!='B' || c!=SPACE) {
+               if (mimeout_mode) {
+                   mime_putc(EOF);
+                   mimeout_mode=0;
+               }
+               (*o_mputc)(c);
+               base64_count ++;
+               return;
+           }
+        } else if (!mimeout_mode && mimeout_f!=FIXED_MIME) {
+           open_mime(output_mode);
+        }
+    } else { /* c==EOF */
+        switch(mimeout_mode) {
+        case 'Q':
+        case 'B':
+            break;
+        case 2:
+            (*o_mputc)(basis_64[((b64c & 0x3)<< 4)]);
+            (*o_mputc)('=');
+            (*o_mputc)('=');
+            base64_count += 3;
+            break;
+        case 1:
+            (*o_mputc)(basis_64[((b64c & 0xF) << 2)]);
+            (*o_mputc)('=');
+            base64_count += 2;
+            break;
+        }
+        if (mimeout_mode) {
+            if (mimeout_f!=FIXED_MIME) {
+                close_mime(); 
+            } else if (mimeout_mode != 'Q')
+                mimeout_mode = 'B';
+        }
+        return;
+    }
+    switch(mimeout_mode) {
+    case 'Q':
+       if(c>=DEL) {
+           (*o_mputc)('=');
+           (*o_mputc)(itoh4(((c>>4)&0xf)));
+           (*o_mputc)(itoh4((c&0xf)));
+       } else {
+           (*o_mputc)(c);
+       }
+        break;
+    case 'B':
+        b64c=c;
+        (*o_mputc)(basis_64[c>>2]);
+        mimeout_mode=2;
+        base64_count ++;
+        break;
+    case 2:
+        (*o_mputc)(basis_64[((b64c & 0x3)<< 4) | ((c & 0xF0) >> 4)]);
+        b64c=c;
+        mimeout_mode=1;
+        base64_count ++;
+        break;
+    case 1:
+        (*o_mputc)(basis_64[((b64c & 0xF) << 2) | ((c & 0xC0) >>6)]);
+        (*o_mputc)(basis_64[c & 0x3F]);
+        mimeout_mode='B';
+        base64_count += 2;
+        break;
+    }
+}
+
+
+#ifdef PERL_XS
+void 
+reinit()
+{
+    unbuf_f = FALSE;
+    estab_f = FALSE;
+    nop_f = FALSE;
+    binmode_f = TRUE;       
+    rot_f = FALSE;         
+    hira_f = FALSE;         
+    input_f = FALSE;      
+    alpha_f = FALSE;     
+    mime_f = STRICT_MIME; 
+    mimebuf_f = FALSE; 
+    broken_f = FALSE;  
+    iso8859_f = FALSE; 
+#if defined(MSDOS) || defined(__OS2__) 
+     x0201_f = TRUE;   
+#else
+     x0201_f = NO_X0201;
+#endif
+    iso2022jp_f = FALSE;
+
+    kanji_intro = DEFAULT_J;
+    ascii_intro = DEFAULT_R;
+
+    output_conv = DEFAULT_CONV; 
+    oconv = DEFAULT_CONV; 
+
+    i_mgetc  = std_getc; 
+    i_mungetc  = std_ungetc;
+    i_mgetc_buf = std_getc; 
+    i_mungetc_buf = std_ungetc;
+
+    i_getc= std_getc; 
+    i_ungetc=std_ungetc;
+
+    i_bgetc= std_getc;
+    i_bungetc= std_ungetc;
+
+    o_putc = std_putc;
+    o_mputc = std_putc;
+    o_crconv = no_connection; 
+    o_rot_conv = no_connection; 
+    o_iso2022jp_check_conv = no_connection;
+    o_hira_conv = no_connection; 
+    o_fconv = no_connection; 
+    o_zconv = no_connection;
+
+    i_getc = std_getc;
+    i_ungetc = std_ungetc;
+    i_mgetc = std_getc; 
+    i_mungetc = std_ungetc; 
+
+    output_mode = ASCII;
+    input_mode =  ASCII;
+    shift_mode =  FALSE;
+    mime_decode_mode =   FALSE;
+    file_out = FALSE;
+    mimeout_mode = 0;
+    mimeout_f = FALSE;
+    base64_count = 0;
+    option_mode = 0;
+    crmode_f = 0;
+
+    e_stat = 0;
+    s_stat = 0;
+#ifdef UTF8_INPUT_ENABLE
+    w_stat = 0;
+#else
+    w_stat = -1;
+#endif
+#ifdef UTF8_OUTPUT_ENABLE
+    if (w_oconv16_begin_f) {
+       w_oconv16_begin_f = 2;
+    }
+#endif
+    f_line = 0;    
+    f_prev = 0;
+    fold_preserve_f = FALSE; 
+    fold_f  = FALSE;
+    fold_len  = 0;
+    fold_margin  = FOLD_MARGIN;
+    broken_counter = 0;
+    broken_last = 0;
+    z_prev2=0,z_prev1=0;
+
+}
+#endif
+
+void 
+no_connection(c2,c1) 
+int c2,c1;
+{
+    no_connection2(c2,c1,0);
+}
+
+int
+no_connection2(c2,c1,c0) 
+int c2,c1,c0;
+{
+    fprintf(stderr,"nkf internal module connection failure.\n");
+    exit(1);
+}
+
+#ifndef PERL_XS
+void 
+usage()   
+{
+    fprintf(stderr,"USAGE:  nkf(nkf32,wnkf,nkf2) -[flags] [in file] .. [out file for -O flag]\n");
+    fprintf(stderr,"Flags:\n");
+    fprintf(stderr,"b,u      Output is bufferred (DEFAULT),Output is unbufferred\n");
+#ifdef DEFAULT_CODE_SJIS
+    fprintf(stderr,"j,s,e,w  Outout code is JIS 7 bit, Shift JIS (DEFAULT), AT&T JIS (EUC), UTF-8\n");
+#endif
+#ifdef DEFAULT_CODE_JIS
+    fprintf(stderr,"j,s,e,w  Outout code is JIS 7 bit (DEFAULT), Shift JIS, AT&T JIS (EUC), UTF-8\n");
+#endif
+#ifdef DEFAULT_CODE_EUC
+    fprintf(stderr,"j,s,e,w  Outout code is JIS 7 bit, Shift JIS, AT&T JIS (EUC) (DEFAULT), UTF-8\n");
+#endif
+#ifdef DEFAULT_CODE_UTF8
+    fprintf(stderr,"j,s,e,w  Outout code is JIS 7 bit, Shift JIS, AT&T JIS (EUC), UTF-8 (DEFAULT)\n");
+#endif
+    fprintf(stderr,"J,S,E,W  Input assumption is JIS 7 bit , Shift JIS, AT&T JIS (EUC), UTF-8\n");
+    fprintf(stderr,"t        no conversion\n");
+    fprintf(stderr,"i_/o_    Output sequence to designate JIS-kanji/ASCII (DEFAULT B)\n");
+    fprintf(stderr,"r        {de/en}crypt ROT13/47\n");
+    fprintf(stderr,"h        1 hirakana->katakana, 2 katakana->hirakana,3 both\n");
+    fprintf(stderr,"v        Show this usage. V: show version\n");
+    fprintf(stderr,"m[BQN0]  MIME decode [B:base64,Q:quoted,N:non-strict,0:no decode]\n");
+    fprintf(stderr,"M[BQ]    MIME encode [B:base64 Q:quoted]\n");
+    fprintf(stderr,"l        ISO8859-1 (Latin-1) support\n");
+    fprintf(stderr,"f/F      Folding: -f60 or -f or -f60-10 (fold margin 10) F preserve nl\n");
+    fprintf(stderr,"Z[0-3]   Convert X0208 alphabet to ASCII  1: Kankaku to space,2: 2 spaces,\n");
+    fprintf(stderr,"                                          3: Convert HTML Entity\n");
+    fprintf(stderr,"X,x      Assume X0201 kana in MS-Kanji, -x preserves X0201\n");
+    fprintf(stderr,"B[0-2]   Broken input  0: missing ESC,1: any X on ESC-[($]-X,2: ASCII on NL\n");
+#ifdef MSDOS
+    fprintf(stderr,"T        Text mode output\n");
+#endif
+    fprintf(stderr,"O        Output to File (DEFAULT 'nkf.out')\n");
+    fprintf(stderr,"d,c      Delete \\r in line feed and \\032, Add \\r in line feed\n");
+    fprintf(stderr,"I        Convert non ISO-2022-JP charactor to GETA\n");
+    fprintf(stderr,"-L[uwm]  line mode u:LF w:CRLF m:CR (DEFAULT noconversion)\n");
+    fprintf(stderr,"long name options\n");
+    fprintf(stderr," --fj,--unix,--mac,--windows                convert for the system\n");
+    fprintf(stderr," --jis,--euc,--sjis,--utf8,--utf16,--mime,--base64  convert for the code\n");
+    fprintf(stderr," --help,--version\n");
+    version();
+}
+
+void
+version()
+{
+    fprintf(stderr,"Network Kanji Filter Version %s (%s) "
+#if defined(MSDOS) && !defined(_Windows)
+                  "for DOS"
+#endif
+#if !defined(__WIN32__) && defined(_Windows)
+                  "for Win16"
+#endif
+#if defined(__WIN32__) && defined(_Windows)
+                  "for Win32"
+#endif
+#ifdef __OS2__
+                  "for OS/2"
+#endif
+                  ,Version,Patchlevel);
+    fprintf(stderr,"\n%s\n",CopyRight);
+}
+#endif
+
+/**
+ ** \e$B%Q%C%A@):n<T\e(B
+ **  void@merope.pleiades.or.jp (Kusakabe Youichi)
+ **  NIDE Naoyuki <nide@ics.nara-wu.ac.jp>
+ **  ohta@src.ricoh.co.jp (Junn Ohta)
+ **  inouet@strl.nhk.or.jp (Tomoyuki Inoue)
+ **  kiri@pulser.win.or.jp (Tetsuaki Kiriyama)
+ **  Kimihiko Sato <sato@sail.t.u-tokyo.ac.jp>
+ **  a_kuroe@kuroe.aoba.yokohama.jp (Akihiko Kuroe)
+ **  kono@ie.u-ryukyu.ac.jp (Shinji Kono)
+ **  GHG00637@nifty-serve.or.jp (COW)
+ **
+ ** \e$B:G=*99?7F|\e(B
+ **  2002.9.24
+ **/
+
+/* end */
diff --git a/nkf.doc b/nkf.doc
new file mode 100644 (file)
index 0000000..cb846ab
--- /dev/null
+++ b/nkf.doc
@@ -0,0 +1,528 @@
+
+
+
+NKF(2)                                                     NKF(2)
+
+
+N\bNA\bAM\bME\bE
+       nkf - ¥Í¥Ã¥È¥ï¡¼¥¯ÍÑ´Á»ú¥³¡¼¥ÉÊÑ´¹¥Õ¥£¥ë¥¿ v2.0
+
+S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
+       n\bnk\bkf\bf [_\bo_\bp_\bt_\bi_\bo_\bn_\bs] [_\bf_\bi_\bl_\be]
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+       _\bn_\bk_\bf¤Ï ¥Í¥Ã¥È¥ï¡¼¥¯¤Ç¥á¡¼¥ë¤ä¥Ë¥å¡¼¥¹¤ÎÆɤ߽ñ¤­¤ò¤¹¤ë¤¿¤á¤Ë
+       ºî¤é¤ì¤¿¡¢´Á»ú¥³¡¼¥É¤ÎÊÑ´¹¥Õ¥£¥ë¥¿¤Ç¤¢¤ë¡£
+
+       ¤³¤Î_\bn_\bk_\bf¤ÎÆÃħ¤È¤·¤Æ¤Ï¡¢ÆþÎÏ´Á»ú¥³¡¼¥É·Ï¤ÎÅý·×Ū¤Ê¼«Æ°Ç§ ¼±
+       µ¡Ç½¤¬¤¢¤ë¡£¤³¤Î¤¿¤á¡¢ÍøÍѼԤϡ¢ÆþÎÏ´Á»ú¥³¡¼¥É·Ï¤¬²¿¤Ç¤¢¤ë
+       ¤«¤òÃΤé¤Ê¤¯¤Æ¤â¡¢½ÐÎÏ´Á»ú¥³¡¼¥É·Ï¤Î¤ß»ØÄꤹ¤ì¤ÐÎɤ¤¤³¤È¤Ë
+       ¤Ê¤ë¡£¤¿¤À¡¢¤³¤ÎȽÄ굡¹½¤Ï¡¢ÍýÏÀŪ¤Ë¤Ï´°Á´¤Ç¤Ï¤Ê¤¤¤¬¡¢Ä̾ï
+       ¤Î¥Ë¥å¡¼¥¹¤ä¥á¡¼¥ë¤Î¥á¥Ã¥»¡¼¥¸¤Ë¤Ä¤¤¤Æ¤Ï³Î¼Â¤ËÆ°ºî¤¹¤ë°ÂÁ´
+       ¤Ê¤â¤Î¤Ë¤Ï¤Ê¤Ã¤Æ¤¤¤ë¡£
+
+       ¸½ºß¡¢_\bn_\bk_\bf¤¬Ç§¼±¤Ç¤­¤ëÆþÎϤδÁ»ú¥³¡¼¥É·Ï¤Ï¡¢¤¤¤ï¤æ¤ë¡ÖJIS¥³
+       ¡¼¥É¡×(ISO- 2022-JP¤Ë´ð¤Å¤¯ ¤â ¤Î)¡¢MS´Á »ú ¥³ ¡¼ ¥É(¥· ¥Õ
+       ¥ÈJIS)¡¢ ÆüËܸìEUC(AT&T¥³¡¼¥É)¤Î¤¤¤º¤ì¤«¤Ç¤¢¤ë¡£½ÐÎϤ¹¤ë´Á
+       »ú¥³¡¼¥É·Ï¤â¡¢¤³¤Î3¼ïÎà¤Ç¤¢¤ë¡£
+
+       ÆþÎϤϡ¢¥Õ¥¡¥¤¥ë¤ò»ØÄꤷ¤Ê¤±¤ì¤Ð¡¢É¸½àÆþÎϤȤʤ롣½ÐÎϤÏɸ
+       ½à½ÐÎϤǤ¢¤ë¡£
+
+       »ØÄê¤Ç¤­¤ë¥ª¥×¥·¥ç¥ó¤Ï¡¢°Ê²¼¤ÎÄ̤ꡣ-\b-m\bmu\bu ¤Î¤è¤¦¤Ë³¤±¤ë¤³¤È
+       ¤¬¤Ç¤­¤ë¡£
+
+       -\b-j\bj     JIS¥³¡¼¥É¤ò½ÐÎϤ¹¤ë¡£(¥Ç¥Õ¥©¥ë¥È)
+
+       -\b-e\be     EUC¥³¡¼¥É¤ò½ÐÎϤ¹¤ë¡£
+
+       -\b-s\bs     ¥·¥Õ¥ÈJIS¥³¡¼¥É¤ò½ÐÎϤ¹¤ë¡£
+
+       -\b-w\bw     UTF8¥³¡¼¥É¤ò½ÐÎϤ¹¤ë¡£
+
+       -\b-m\bm[\b[B\bBQ\bQS\bSN\bN0\b0]\b]
+              MIME   ¤ò  ²ò   ÆÉ   ¤¹   ¤ë¡£(¥Ç   ¥Õ¥©   ¥ë   ¥È)
+              ISO-2022-JP(base64)¤ÈISO-8859-1(Q  encode) ¤Î¤ß¤ò²ò
+              Æɤ¹¤ë¡£ISO-8859-1 (Latin-1) ¤ò²òÆɤ¹¤ë»þ¤Ï¡¢  -l¥Õ
+              ¥é ¥° ¤â É¬ÍפǤ¢¤ë¡£-m0 ¤Ç¤ÏMIME¤ò²òÆɤ·¤Ê¤¤¡£-mQ,
+              -mB¤Ç¤Ï¡¢ Q encode, B encode ¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤È¤·¤Æ½è
+              Íý¤¹¤ë¡£
+                -mB   MIME base64 stream ¤ò²òÆɤ¹¤ë¡£¥Ø¥Ã¥À¤Ê¤É¤Ï¼è¤ê½ü¤¯¤³¤È¡£
+                -mQ   MIME quoted stream ¤ò²òÆɤ¹¤ë¡£
+                -mS   MIME ¤Î¥Á¥§¥Ã¥¯¤ò¸·¤·¤¯¤¹¤ë (¥Ç¥Õ¥©¥ë¥È)
+                -mN   MIME ¤Î¥Á¥§¥Ã¥¯¤ò´Ë¤¯¤¹¤ë
+                -m0   MIME ¤ò²òÆɤ·¤Ê¤¤¡£
+
+                 -mS ¤Ï¡¢Àë¸À¤ÎÆâÍƤȡ¢¤½¤Î¸å¤Ë³¤¯base64¤ÎÀ°¹çÀ­¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+                 -mN  ¤Ï¡¢²þ¹Ô¤ÇÀÚ¤é¤ì¤¿MIME¤Ê¤É¤â²òÆɤ¹¤ë¡£²òÆɤ¬»ß¤Þ¤é¤Ê¤¤¤³¤È¤â¤¢¤ë¡£
+
+       -\b-M\bM[\b[B\bBQ\bQ]\b] MIME  ¤ËÊÑ´¹¤¹¤ë¡£JIS¤Ë¥³¡¼¥ÉÊÑ´¹¤·¤Æ¤«¤ébase64¤µ¤ì
+              ¤ë¡£
+
+
+
+                            9/Sep/2002                          1
+
+
+
+
+
+NKF(2)                                                     NKF(2)
+
+
+                -M    ¥Ø¥Ã¥À·Á¼°¤ËÊÑ´¹¤¹¤ë
+                -MB   base64 stream ¤ËÊÑ´¹¤¹¤ë
+                -MQ   Quoted stream ¤ËÊÑ´¹¤¹¤ë
+
+              -\b-J\bJ -\b-E\bE -\b-S\bS -\b-X\bX -\b-B\bB
+                     ´üÂÔ¤µ¤ì¤ëÆþÎÏ¥³¡¼¥É¤ÎÀ­¼Á¤ò»ØÄꤹ¤ë¡£
+
+                      -\b-J\bJ     ISO-2022-JP¤ò²¾Äꤹ¤ë¡£
+
+                      -\b-E\bE     ÆüËܸìEUC(AT&T)¤ò²¾Äꤹ¤ë¡£
+
+                      -\b-S\bS     MS´Á»ú¤ò²¾Äꤹ¤ë¡£X0201²¾Ì¾¤â²¾Äê ¤µ
+                             ¤ì¤ë¡£
+
+                      -\b-X\bX     MS´Á »ú Ãæ ¤ËX0201²¾Ì¾¤¬¤¢¤ë¤È²¾Äꤹ
+                             ¤ë¡£
+
+                      -\b-B\bB     ²õ¤ì¤¿(Broken)JIS¥³¡¼¥É¡£ESC¤¬ ¤Ê ¤¯
+                             ¤Ê¤Ã¤¿¤È²¾Äꤹ¤ë¡£
+
+                             -\b-B\bB1\b1      E\bES\bSC\bC-\b-(\b(, E\bES\bSC\bC-\b-$\b$ ¤Î¤¢¤È¤Î¥³¡¼¥É
+                                    ¤òÌä¤ï¤Ê¤¤
+
+                             -\b-B\bB2\b2    ²þ¹Ô¤Î¤¢¤È¤Ë¶¯À©Åª¤ËASCII¤ÎÌá
+                                    ¤¹
+
+              -\b-f\bf_\b?    °ì ¹Ô_\b?ʸ»ú¤Ë¤Ê¤ë¤è¤¦¤Ë´Êñ¤ÊÀ°·Á¤ò¤ª¤³¤Ê¤¦¡£
+                     ¥Ç¥Õ¥©¥ë¥È¤Ï 60ʸ»ú¤Ç¤¢¤ë¡£
+
+              -\b-Z\bZ     X0208Ãæ¤Î±Ñ¿ô»ú¤È¼ã´³¤Îµ­¹æ¤òASCII¤ËÊÑ ´¹ ¤¹
+                     ¤ë¡£-Z1  ¤ÏX0208´Ö ³Ö ¤òASCII  space¤ËÊÑ´¹¤¹
+                     ¤ë¡£-Z2¤ÏX0208´Ö³Ö¤òASCII space Æó¤Ä¤ËÊÑ´¹¤¹
+                     ¤ë¡£¼ñÌ£¤Ë¤è¤Ã¤Æ»È¤¤Ê¬¤±¤Æ¤Û¤·¤¤¡£
+
+              -\b-b\bb     ¥Ð¥Ã¥Õ¥¡¥ê¥ó¥°½ÐÎϤò¹Ô¤¦¡£(¥Ç¥Õ¥©¥ë¥È)
+
+              -\b-u\bu     ½Ð ÎÏ»þ¤Ë¡¢¥Ð¥Ã¥Õ¥¡¥ê¥ó¥°¤·¤Ê¤¤¡£ ssh local-
+                     host | nkf -u ¤È¤¤¤¦¤è¤¦¤Ë»È¤¦¡£
+
+              -\b-t\bt     ²¿¤â¤·¤Ê¤¤¡£
+
+              -\b-I\bI     iso-2022-jp°Ê³°¤Î´Á»ú¥³¡¼¥É¤ò¢®¤ËÊÑ´¹¡£
+
+              -\b-i\bi_\b?    JIS´Á»ú¤ò»Ø ¼¨ ¤¹ ¤ë ¥· ¡¼ ¥± ¥ó ¥¹ ¤È ¤· ¤Æ
+                     E\bES\bSC\bC-\b-'\b'$\b$'\b'-\b-_\b?¤ò  »È  ÍÑ  ¤¹ ¤ë¡£  (¥Ç ¥Õ¥© ¥ë ¥È
+                     ¤Ï¡¢ESC-'$'-'B')
+
+              -\b-o\bo_\b?    1¥Ð¥¤¥È±Ñ¿ôʸ»ú¥»¥Ã¥È¤ò»Ø¼¨¤¹¤ë¥·¡¼¥±¥ó¥¹ ¤È
+                     ¤· ¤Æ¡¢E\bES\bSC\bC-\b-'\b'(\b('\b'-\b-_\b?¤ò »È ÍÑ ¤¹ ¤ë¡£ (¥Ç¥Õ¥©¥ë¥È
+                     ¤Ï¡¢ESC-'('-'B')
+
+              -\b-r\br     ROT13/47¤ÎÊÑ´¹¤ò¤¹¤ë¡£
+
+              -\b-v\bv     ¥Ð¡¼¥¸¥ç¥ó¤òɽ¼¨¤¹¤ë¡£
+
+
+
+                            9/Sep/2002                          2
+
+
+
+
+
+NKF(2)                                                     NKF(2)
+
+
+              -\b-T\bT     ¥Æ¥­¥¹¥È¥â¡¼¥É¤Ç½ÐÎϤ¹¤ë¡£(MS-DOS¾å¤Ç¤Î¤ß ¸ú
+                     ÎϤò»ý¤Ä)
+
+              -\b-l\bl     0x80-0xfe¤Î ¥³¡¼¥É¤òISO-8859-1 (Latin-1)¤È¤·
+                     ¤Æ°·¤¦¡£ JIS¥³¡¼¥É¥¢¥¦¥È¥×¥Ã¥È¤È¤ÎÁȹ礻¤ß¤Î
+                     ¤ßÍ­¸ú¡£ -s, -e, -x¤È¤ÏξΩ¤·¤Ê¤¤¡£
+
+              -\b-x\bx     Ä̾浪¤³¤Ê¤ï¤ì¤ëX0201²¾Ì¾->X0208¤Î²¾Ì¾ÊÑ´¹¤ò
+                     ¤·¤Ê¤¤¤Ç¡¢
+                      X0201²¾  Ì¾  ¤ò  ÊÝ  Â¸  ¤¹  ¤ë¡£   Æþ   ÎÏ
+                     ¤Ï¡¢MS-Kanji¤Î1byte²¾  Ì¾¡¢SO/SI¡¢  ESC-(-I,
+                     SSO¤ò¼õ¤±ÉÕ¤±¤ë¡£½Ð ÎÏ ¤Ï¡¢ Æü ËÜ ¸ìEUCÃæ ¤Ç
+                     ¤ÏSSO¡¢ JIS¤Ç¤Ï ESC-'('-I ¤ò»È¤¦¡£
+
+              -\b-O\bO     ¥Õ¥¡ ¥¤ ¥ë ¤Ë ½ÐÎϤ¹¤ë¡£Unix¤Ç¤ÏÉÔÍפʵ¡Ç½¤À
+                     ¤¬Windows¤äMSDOS¤Ç¤ÏɬÍפ餷¤¤¡£Ä¾¸å¤Î°ú¤­¿ô
+                     ¤Ç¤Ê¤¯¡¢ºÇ¸å¤Î¥Õ¥¡¥¤¥ë̾¤¬½ÐÎÏ¥Õ¥¡¥¤¥ë̾¤È¤Ê
+                     ¤ê¾å½ñ¤­¤µ¤ì¤Æ¤·¤Þ¤¦¤Î¤ÇÃí°Õ¡£¥Õ¥¡¥¤¥ë̾¤¬¤Ê
+                     ¤¤¾ì¹ç¤Ï¡¢ nkf.out¡£-OW ¤Ç¤Ï¡¢¸µ¤Î¥Õ¥¡¥¤¥ë¤ò
+                     ÊÑ´¹·ë²Ì¤ÇÃÖ¤­´¹¤¨¤ë¡£Ê£¿ô¤Î¥Õ¥¡¥¤¥ë¤ò½ñ¤­´¹
+                     ¤¨¤ë¤³¤È¤â²Äǽ¡£
+
+              -\b-c\bc     NL¤Þ¤¨¤ËCR¤òÉղ乤롣
+
+              -\b-d\bd     NL¤Þ¤¨¤ÎCR¤òºï½ü¤¹¤ë¡£Ã±ÆȤÎCR¤Ï¡¢NL¤ËÃÖ¤­´¹
+                     ¤¨¤é¤ì¤ë¡£
+
+              -\b-L\bL[\b[w\bwm\bmu\bu]\b] ²þ\b\b²þ¹Ô\b\b¹Ô¥â\b\b¥â¡¼\b\b¡¼¥É\b\b¥É
+                                   -Lu   unix (LF)
+                                   -Lw   windows (CRLF)
+                                   -Lm   mac (CR)
+                               ¥Ç¥Õ¥©¥ë¥È¤ÏÊÑ´¹¤Ê¤·¡£
+
+              -\b--\b- Ä¹\b\bŤ¤\b\b¤¤Ì¾\b\b̾Á°\b\bÁ°¤Î\b\b¤Î¥ª\b\b¥ª¥×\b\b¥×¥·\b\b¥·¥ç\b\b¥ç¥ó\b\b¥ó¡£\b\b¡£¤³\b\b¤³¤ì\b\b¤ì¤é\b\b¤é¤Ï\b\b¤Ï¡¢\b\b¡¢¾å\b\b¾å¤Î\b\b¤Î¥ª\b\b¥ª¥×\b\b¥×¥·\b\b¥·¥ç\b\b¥ç¥ó\b\b¥ó¤Î\b\b¤Î
+              ÁÈ\b\bÁȹç\b\b¹ç¤»\b\b¤»¤Î\b\b¤ÎÊÌ\b\bÊÌ̾\b\b̾¡£\b\b¡£
+                          --fj,--unix,--mac,--msdos, --windows
+                                ¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¤ËŬ¤·¤¿ÊÑ´¹¤ò¤·¤Þ¤¹¡£
+
+                          --jis,--euc,--sjis,--mime,--base64
+                             Âбþ¤¹¤ëÊÑ´¹¤ò¤·¤Þ¤¹¡£
+
+                          --hirakana, --katakana Ê¿²¾Ì¾¡¢ÊÒ²¾Ì¾ÊÑ´¹
+                          --help
+                          --version
+                          --        ¤³¤ì°Ê¹ß¤Î¥ª¥×¥·¥ç¥ó¤ò̵»ë¤¹¤ë
+
+A\bAU\bUT\bTH\bHO\bOR\bR
+       »ÔÀî  »ê  ichikawa@flab.fujitsu.co.jp   (was ichikawa@fujitsu.JUNET)
+       ²ÏÌî  ¿¿¼£      kono@ie.u-ryukyu.acjp
+       Rei FURUKAWA    furukawa@tcp-ip.or.jp
+
+
+
+
+
+
+
+                            9/Sep/2002                          3
+
+
+
+
+
+NKF(2)                                                     NKF(2)
+
+
+B\bBU\bUG\bGS\bS
+       ¼Â¤Ï¡¢ÆþÎϤΥ³¡¼¥É·Ï¤ÎȽÄê¤Ï¡¢EUC¤È¥·¥Õ¥ÈJIS¤È¤Î¼«Æ°È½Äê¤Ç
+       ¤¢¤ê¡¢ºÇ½é¤ËÆÃÄê¤Ç¤­¤ëʸ»ú¤¬Í褿»þÅÀ¤Ç³ÎÄꤷ¤Æ¤·¤Þ¤¦¡£¤½¤·
+       ¤Æ¡¢ÆÃÄêÉÔǽ¤Î´Ö¤ÏÊÝα¥Ð¥Ã¥Õ¥¡¤Ë¤¿¤á¤Æ¤ª¤«¤ì¡¢³ÎÄê¸å¤Ë½èÍý
+       ¤µ¤ì¤ë¡£¤³¤Î¤¿¤á¡¢
+
+       1)     7¥Ó¥Ã ¥ÈJIS¤Ï¾ï¤Ëǧ¼±¤µ¤ì¤ë¡£¥·¥Õ¥ÈJIS¡¢EUCº®¹ç¤â¤Û
+              ¤È¤ó¤É¤Î¾ì¹ç¤ÏÌäÂ꤬¤Ê¤¤¡£¤¿¤À¤·¡¢
+
+       2)     ¥·¥Õ¥ÈJIS¤ÎX0201²¾Ì¾¤ÈEUC¤¬¼±Ê̤Ǥ­¤Ê¤¤¡£¤· ¤¿ ¤¬¤Ã
+              ¤Æ¡¢ ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¥·¥Õ¥ÈJIS¤ÎX0201²¾Ì¾¤Ï¤Ê¤¤¤È²¾Äê
+              ¤·¤Æ¤¤¤ë¡£
+
+       ¤³¤Î¥Õ¥£¥ë¥¿¤ÎÊÑ´¹¤Ï¡¢¥³¡¼¥É·Ï¤ËÂбþ¤·¤¿°ì³ç¼ÌÁü¤ò»Ü¤¹¤À¤±
+       ¤Ê ¤Î¤Ç¡¢³°»ú¤äÆü쵭¹æ¤ä·ÓÀþÁÇÊҤʤɡ¢JISÂè°ì¡¢ÂèÆó¿å½àɽ
+       ¤Ë¤ª¤¤¤ÆÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¥³¡¼¥É¤Ë³Æ¼Ò¤Ë¤è¤ê³ä¤êÅö¤Æ¤é¤ì¤¿Ê¸
+       »ú ÊÑ´¹¤·¤Ê¤¤¡£Âè»°¿å½à¤Ê¤É¤âÊÑ´¹¤·¤Ê¤¤¡£ UTF8¤ÎÆüËܸì°Ê³°
+       ¤ÎÉôʬ¤Ë¤âÂбþ¤·¤Æ¤¤¤Ê¤¤¡£
+
+
+k\bko\bon\bno\bo@\b@c\bcs\bsl\bl.\b.s\bso\bon\bny\by.\b.c\bco\bo.\b.j\bjp\bp (\b(S\bSh\bhi\bin\bnj\bji\bi K\bKo\bon\bno\bo)\b) ¤Ë\b\b¤Ë¤è\b\b¤è¤ë\b\b¤ëÊÑ\b\bÊѹ¹\b\b¹¹¡£\b\b¡£
+       X0201²¾Ì¾(¤¤¤ï¤æ¤ëȾ³Ñ¤«¤Ê)¤Ï¥Ç¥Õ¥©¥ë¥È¤ÇX0208(Á´³Ñ²¾Ì¾)¤Ë
+       ÊÑ ´¹ ¤µ ¤ì ¤ë¡£¤¿¤À¤·¡¢¥·¥Õ¥ÈJIS¤ÎX0201²¾Ì¾¤Ï¥Ç¥Õ¥©¥ë¥È¤Ç
+       ¤ÏEUC¤À¤È²ò¼á¤µ¤ì¤Æ¤·¤Þ¤¦¡£¤³¤ì¤¬Ë¾¤Þ¤·¤¯¤Ê¤¤»þ¤Ë¤Ï -S  ¤ä
+       -  -X ¤Ê¤É¤Î¥Õ¥é¥°¤ò»È¤¨¤ÐÎɤ¤¡£-X¤ò»ØÄꤹ¤ë¤È°ìö³ÎÄꤷ¤¿
+       ¥·¥Õ¥ÈJIS¤«¤é EUC¤Ë°Ü¹Ô¤¹¤ë¤³ ¤È ¤Ï ¤Ê ¤¤¡£ESC-(-I¤Ë ¤è ¤ë
+       X0201¤Ï¾ï¤Ëǧ¼±¤µ¤ì¤ë¡£SI/SO SSO¤Ï¡¢-l¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì
+       ¤ÐX0201¤È²ò¼á¤¹¤ë¡£
+
+       MIME
+       decode¤Ï¡¢ISO-2022-JP¤Îbase64¤È¡¢ISO-8859-1¤Î16¿Êencode¤Î
+       ¤ß decode¤¹¤ë¡£ MIME decode¤Ï¡¢Ã±½ã¤Ê²þ¹Ô¤ä¶õÇò¤Ï°ÂÁ´¤Ë ÆÉ
+       ¤ßÈô¤Ð¤µ¤ì¤ë¡£¤È¤¤¤¦¤³¤È¤Ï¡¢ MIME decodeÃæ¤Î¶õÇò¤ÏÊݸ¤µ¤ì
+       ¤Ê¤¤¡£ÊÑ´¹¤Ï²ÄµÕ¤Ç¤Ï¤Ê¤¤¡£ less¤ärn¤Ç¹Ô¤¬Ê¬³ä¤µ¤ì¤¿»þ ¤Ï¡¢
+       Terminal¤Ë ¤è¤Ã¤Æ°Û¤Ê¤ë ESC-[-K ¤Ê¤É¤¬ÁÞÆþ¤µ¤ì¤ë¤Î¤Ç¡¢´°Á´
+       ¤Ë¤Ïdecode ¤Ç¤­¤Ê¤¤¡£-mN ¤Ç¤Ï¡¢¥Á¥§¥Ã¥¯¤¬´Ë¤¤¤Î¤Ç decode¤Ç
+       ¤­¤ë¾ì¹ç¤â¤¢¤ë¡£ ISO-8859-1 ½ÐÎϤÏJIS ¥³¡¼¥É½ÐÎϤȤ·¤«Î¾Î©
+       ¤·¤Ê¤¤¡£
+
+       Fold µ¡Ç½¤Ïfmt¤È°Û¤Ê¤ê¹ÔƬ¤Î¶õÇò¤ò̵»ë¤¹¤ë¡£¶Ø§½èÍý¤Ï¤¢¤ë
+       ¤¬»ØÄꤵ¤ì¤¿Ä¹¤µ+5¤Ç¶¯À©²þ¹Ô¤¹¤ë¡£-f60-10 ¤Ê¤É¤È¤¹¤ë¤È¶¯À©
+       ²þ¹Ô¤Î;ÃÏ(fold-margin) ¤òÄ´À°¤Ç¤­¤ë¡£-f40-0¤È¤¹¤ë¤È¶Ø§½è
+       Íý¤Ê¤·¤È¤Ê¤ë¡£
+
+       X0201²¾Ì¾¤Ïrot47¤µ¤ì¤Ê¤¤¡£
+
+
+n\bnk\bkf\bf 1\b1.\b.6\b6 k\bko\bon\bno\bo@\b@i\bie\be.\b.u\bu-\b-r\bry\byu\buk\bky\byu\bu.\b.a\bac\bc.\b.j\bjp\bp (\b(S\bSh\bhi\bin\bnj\bji\bi K\bKo\bon\bno\bo)\b) ¤Ë\b\b¤Ë¤è\b\b¤è¤ë\b\b¤ëÊÑ\b\bÊѹ¹\b\b¹¹¡£\b\b¡£
+        -B  ¤Îlevel¤ò0,1,2 ¤ËÁý¤ä¤·¤¿¡£MIME¤Îbase64, Q-Encoding¤ò
+       ²òÆɤ¹¤ëµ¡Ç½¤òÉÕ¤±¤¿¡£¥Ø¥Ã¥À¤Ê¤É¤Ï²òÆɤ·¤Ê¤¤¤Î¤Ç¡¢Encode¤µ
+       ¤ì ¤¿Éôʬ¤À¤±¤òÄ̤¹É¬Íפ¬¤¢¤ë¡£ -mB ¤Ï¡¢nkf1.5¤È°ã¤¦Æ°¤­¤ò
+       ¤¹¤ë¤Î¤Ç¡¢-B -m ¤È¤¹¤ë¤³¤È¡£
+
+
+
+
+
+                            9/Sep/2002                          4
+
+
+
+
+
+NKF(2)                                                     NKF(2)
+
+
+n\bnk\bkf\bf 1\b1.\b.6\b6.\b.1\b1
+       -Z1 ¤ÇX0208´Ö³Ö->ASCII space¤Î ÊÑ ´¹ ¤ò ¤ª ¤³ ¤Ê ¤¦¡£  -Z2
+       ¤ÇX0208´Ö³Ö->ASCII space 2¸Ä¤ÎÊÑ´¹¤ò¤ª¤³¤Ê¤¦¡£
+
+
+
+n\bnk\bkf\bf 1\b1.\b.7\b7
+       ESC-$-(-B ¤Ê¤É¤Ë¤âÂбþ¤¹¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£
+
+       copy  right ¤ÎÈó±ÄÍø¤Î¾ò·ï¤¬ÉÔÍפˤʤä¿¡£»ÈÍÑ»þ¤ÎÌ䤤¹ç¤ï
+       ¤»¤âÉÔÍס£
+
+       Perl Extension ¤È¤·¤Æ»È¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£
+
+
+n\bnk\bkf\bf 1\b1.\b.9\b9
+       MIME ¥¨¥ó¥³¡¼¥É¤Îµ¡Ç½»þ¤Ç¤â¡¢¥³¡¼¥ÉÊÑ´¹¤µ¤ì¤·¤Þ¤¦ ¤Î ¤Ç Ãí
+       °Õ¡£ base64 ¥¨¥ó¥³¡¼¥É¤Ç¤Ï²þ¹Ô»þ¤ËÀèƬ¤Ë¶õÇò¤¬ÉÕ¤¯¤Î¤Ç¥á¡¼
+       ¥ë¥Ø¥Ã¥À¤Ë»ÈÍѤǤ­¤ë¡£
+
+       ¥³¡¼¥ÉÊÑ´¹¥â¥¸¥å¡¼¥ë¤Ï¡¢¥µ¥Ö¥ë¡¼¥Á¥ó¤ò·Ñ³¤Ë¤è¤Ã¤ÆÀܳ¤¹¤ë
+       ·Á¼°¤È¤Ê¤Ã¤¿¡£Ê£¿ô¤ÎÊÑ´¹¤ò¼«Í³¤ËÀܳ¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£
+
+             getc  <--  iconv  --> oconv --> other conversion -->
+       putc
+
+       ¤È¤¤¤¦·Á¤Ç¡¢½ç¤Ë¸Æ¤Ó½Ð¤µ¤ì¤ë¡£
+
+
+       Ä¹¤¤¥ª¥×¥·¥ç¥ó̾¤òµö¤¹¤è¤¦¤Ë¤Ê¤Ã¤¿¡£
+           --mac
+           --jis
+           --unix ¤Ê¤É¡£
+
+
+U\bUT\bTF\bF-\b-8\b8 ¥µ\b\b¥µ¥Ý\b\b¥Ý¡¼\b\b¡¼¥È\b\b¥È¤Ë\b\b¤Ë¤Ä\b\b¤Ä¤¤\b\b¤¤¤Æ\b\b¤Æ
+       furukawa@tcp-ip.or.jp ¤Ë¤è¤ë¡£
+
+       ½¾Íè¤Î nkf ¤ÈƱÍͤˡ¢nkf -e ¤È¤·¤Æµ¯Æ°¤¹¤ë¤È¡¢¼«Æ°È½ ÊÌ ¤Ç
+       UTF-8 ¤ÈȽÄꤵ¤ì¤ì¤Ð¡¢¤½¤Î¤Þ¤Þ euc-jp ¤ËÊÑ´¹¤µ¤ì¤ë¡£
+
+
+       ¥ª¥×¥·¥ç¥ó¤Ç¡¢Ê¸»ú¥³¡¼¥É¤ò»ØÄê¤Ç¤­¤ë¡£
+
+           -w   ½ÐÎϤò utf-8 ¤Ë»ØÄꤷ¤Þ¤¹
+           -W   ÆþÎϤò utf-8 ¤È²¾Äꤷ¤Þ¤¹
+
+       Æä˼«Æ°È½ÊÌ¡¢¥³¡¼¥Éº®ºß¡¢¥¨¥é¡¼½èÍý·Ï¤Ë¤ÏȽÄê¤ò¼ºÇÔ¤¹¤ë¤³
+       ¤¬¤¢¤ë¡£
+
+
+         -Z3 ¥ª¥×¥·¥ç¥ó¤Î¿·Àß
+               X0208 ¤Î '¡ä', '¡ã', '¡É', '¡õ'  ¤ò¤½¤ì¤¾¤ì
+               '&gt;', '&lt;', '&quot;', '&amp;' ¤ËÊÑ´¹¤·¤Þ¤¹
+
+
+
+                            9/Sep/2002                          5
+
+
+
+
+
+NKF(2)                                                     NKF(2)
+
+
+n\bnk\bkf\bf 2\b2.\b.0\b0
+       newline ¤òÊݸ¤¹¤ë folding -F¡£fmt¤Ë¶á¤¤Æ°ºî¤ò¤¹¤ë¡£
+
+
+       folding ¤Î¥Þ¡¼¥¸¥ó¡£-f60-0 ¤Ê¤É¤È¡¢0¤Ë¤¹¤ë¤È¶Ø§¤»¤º¤Ë¡¢¶¯
+       À©Åª¤Ëfolding¤¹¤ë¡£·ÈÂӤ˥᡼¥ë¤òÁ÷¤ë¤È¤­¤Ë»È¤¦¡£
+
+
+       nkf  -f40-0  ¤Ê ¤É ¤È ¤·¤Æ¥á¡¼¥ë¤ò 40 Ê¸»ú¤Å¤ÄÀÚ¤ê½Ð¤·¤Æ¡¢
+       ¡ÖSubject 160 Ê¸»úÌܤ«¤é 199 Ê¸»úÌܤޤǡסÖËÜʸ    200  Ê¸
+       »úÌܤ«¤é 239 Ê¸»úÌܤޤǡפȤ¹¤ë¡£
+
+
+M\bMI\bIM\bME\bE´Ø\b\b´Ø·¸\b\b·¸
+       fixed mime mode ( -mQ ) ¤Ç =? ¤Ç Q-encode ¤¬È´¤±¤Æ¤·¤Þ¤¦¥Ð
+       ¥°¤Î½¤Àµ¡£
+
+
+       Q encode ¤Î Soft Wrap ¤ËÂбþ¡£
+
+
+       MIME encode ¤ÎWrap¤Ç¤Ï¡¢ÀèƬ¤Ë°ìʸ»ú¤Î¶õÇòÁÞÆþ¡£¤·¤¿¡£ ¤¢A
+       ¤Î MIME ÊÑ´¹¤Ï¡¢A ¤ò´Þ¤ó¤ÇÊÑ´¹¤·¤Ê¤¤¤È¤¤¤±¤Ê¤¤¤¬¡¢Âбþ¤·¤Æ
+       ¤¤¤Ê¤¤¡£RFC¤Ë¤ÏÈ¿¤·¤¿Æ°ºî¤À¤¬¡¢  encoded  word  ´Ö ¤Îwhite
+       space¤Ï̵»ë¤µ¤ì¤ë¡£ nkf_test.pl ¤Ç¤Ï¡¢MIME¤Î¶õÇò¤òºï½ü¤·¤Æ
+       ¤«¤éÈæ³Ó¤·¤Æ¤¤¤ë¡£
+
+
+       non-strict mime -MN ¤Ç¤Ï¡¢¶õÇò¡¢²þ¹Ô¤ò ¤Þ ¤¿ ¤¤ ¤Ç¡¢base64
+       encoding ¤ò²òÆɤ¹¤ë¡£¤³¤ì¤Ç¡¢¥¹¥¯¥ê¡¼¥ó¤«¤écut&paste¤Ç¥Ç¥³
+       ¡¼¥É¤¹¤ë¤³¤È¤â²Äǽ¡£»ß¤Þ¤é¤Ê¤¤²ÄǽÀ­¤¢¤ê¡£
+
+
+       nkf_test.pl ¤Î¥Ð¥°¥Á¥§¥Ã¥¯¤òÁý¤ä¤·¤¿¡£ test ¤¬¼ºÇÔ¤·¤¿¤È¤­
+       ¤Ëdiff¤ò¼è¤ë¤è¤¦¤Ë¤·¤¿¡£ make_test.pl ¤Ç¥Æ¥¹¥ÈºîÀ®²Äǽ¡£
+
+
+       Perl  module¤Ç¡¢\0¤ò ´Þ ¤àʸ»úÎó¤âÊÑ´¹¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£
+       Perl XS¤Ç¤Îʸ»úÎó¤ÎŤµ¤Î°·¤¤¤ò½¤Àµ¡£
+
+       NKF¤òNKF.mod¤Ë¤·¤¿¤Î¤Ç¡¢Mac OS X ¤ÇMake¤Ç¥³¥ó¥Ñ¥¤¥ë²½¡£
+
+
+       rot13¤¬1.9¤ÇÆ°¤«¤Ê¤¯¤Ê¤Ã¤Æ¤¤¤¿¤Î¤ò½¤Àµ¡£
+
+
+       -Z ¤Î´Ö³Ö¤ä¤ª¤«¤·¤ÊÊÑ´¹¤Î½¤Àµ
+
+
+       hiragana/katakana ÊÑ´¹¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£
+          -h1   --katakana ¤Ò¤é¤¬¤Ê->¤«¤¿¤«¤Ê
+          -h2   --hirakana ¤«¤¿¤«¤Ê->¤Ò¤é¤¬¤Ê
+          -h3   --hirakana-katakana ¤«¤¿¤«¤Ê<->¤Ò¤é¤¬¤Ê
+
+
+
+
+                            9/Sep/2002                          6
+
+
+
+
+
+NKF(2)                                                     NKF(2)
+
+
+       -OW ¤Ç¡¢°ú¿ô¤Î¥Õ¥¡¥¤¥ë¤òľÀÜ¡¢ÃÖ¤­´¹¤¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
+
+
+
+A\bAC\bCK\bKN\bNO\bOW\bWL\bLE\bED\bDG\bGE\bE
+       °Ê²¼¤Î¤«¤¿¤¬¤¿¡¢¤É¤¦¤â¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£
+
+
+       nkf 1.4
+       morb@fujitsu, kiss@ayumi.stars.flab.fujitsu, cen122@flab.fujitsu,
+       yuki@flab.fujitsu Â¾¡¢fujitsu & flab.fujitsu¤Î³§¤µ¤ó¤Î¶¨ÎϤ˴¶¼Õ¡£
+       shinoda@cs.titech, kato@cs.titech, uematsu@cs.titech  TNX
+       kono@ie.u-ryukyu.ac.jp
+
+       nkf 1.9
+       Akio Furukawa
+       From: OHARA Shigeki
+       Hiroaki Sengoku
+       Ikuhiro MORITA (¿¹ÅÄ °é¹¨)
+       Junn Ohta
+       KAWAMURA Masao
+       Kazuhiko Mori
+       Keitaro Isokawa
+       Ken-ichi Hirose
+       Ki-ichiro SATO
+       Kiwamu Aoyama
+       Koichi Hirayama
+       Mitsuru Hase¡ÊĹë Ëþ¡Ë
+       OHARA Shigeki (Â縶 ½Å¼ù)
+       Rei FURUKAWA
+       Satoru Takabayashi
+       Shigeyuki Takagi
+       Shin MICHIMUKO
+       Tsutomu Sakai
+       YAMASHITA Junji (»³²¼ ½ã»Ê)
+       Yasuyuki Sato
+       Yoshiaki Yanagihara
+       Yoshiaki Yanagihara
+       hat@so-net
+       £Ä£Ã£Ãµ»½ÑÉôÅÏÊÕ
+       ¤«¤È¤Ú / ²ÃÆ£ µ®»Ê
+       ¤«¤Ùdais
+       ¤Ò¤í¤» ¤Þ¤µ¤¢¤­
+       ¥¤¥ó¥È¥é¥Í¥Ã¥È¥·¥¹¥Æ¥à(³ô)¾¾Èø
+       ±­»ôʸÉÒ
+       ±öºê µ£É§(SHIOZAKI Takehiko)
+       ²Ï¼²íÉ× (Media Lab.)
+       ²ÏÌî ¹¯»Ê
+       ´îÀ¥¡ÈÅßÇ­¡É¹À¡÷Æî¹ñ²­Æì
+       ¶â°æ ÃÒɧ
+       ·ËÅÄ Í´»Ë ¡Ê¤«¤Ä¤é¤À ¤Þ¤µ¤·¡Ë
+       ¹â¶¶µ¹ÌÁ
+       ¹ñµÈ
+       ¹õ¹¾ÌÀɧ
+
+
+
+                            9/Sep/2002                          7
+
+
+
+
+
+NKF(2)                                                     NKF(2)
+
+
+       »°ÂðÀµÂÙ
+       »³ÁÒ ¿¿
+       »³Ëܠ˧¿Í
+       »³Ìî͵»Ê (¤ä¤Þ¤Î¤æ¤¦¤¸)
+       ½Å¼ˡ¹î
+       ¾®Åç´ðÌ÷
+       ¾åÅÄ ·ò
+       ¿·°æ ¹¯»Ê (Koji Arai)
+       ¿¹ À鳨»Ò
+       ¿¹ ÏÂɧ
+       ¿åÌî µ®Ê¸
+       Á°ÃÏϽÓ
+       Ã罡º¬¡÷ÊÂÎó¿®Í긦
+       Ãö렱ѰìϺ == Eiichiro Itani
+       Æ£¸¶ ½¨¹Ô
+       È¬ÅÄ ¿¿¹Ô (Masayuki Hatta)
+       ÈøÀîÉÒÌé
+       Ë¾·î ¹§»Ö
+       ÌÚ¼¡Ê¡÷ÃÞÇÈÂç³Ø¿ô³Ø¸¦µæ²Ê¡Ë
+       Ìî¼½Ó¾´
+       Í­²¬¡÷¥ß¥Î¥ë¥¿
+       Í­Âô ÌÀ¹¨
+       Íî¹ç°ì´î
+       ÎÓ  Î¼
+       Ô¢°Â ¼£
+
+
+       ²ÏÌî¿¿¼£
+            www.ie.u-ryukyu.ac.jp/~kono/nkf/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                            9/Sep/2002                          8
+
+
diff --git a/nkf_test.pl b/nkf_test.pl
new file mode 100644 (file)
index 0000000..ce8f7cd
--- /dev/null
@@ -0,0 +1,633 @@
+#!/usr/local/bin/perl
+#
+# nkf test program for nkf 1.7
+#    Shinji KONO <kono@ie.u-ryukyu.ac.jp>
+# Sun Aug 18 12:25:40 JST 1996
+# Sun Nov  8 00:16:06 JST 1998
+#
+# This is useful when you add new patch on nkf.
+# Since this test is too strict, faileurs may not mean
+# wrong conversion. 
+#
+# nkf 1.5 differs on MIME decoding
+# nkf 1.4 passes Basic Conversion tests
+# nkf PDS version passes Basic Conversion tests  using "nkf -iB -oB "
+#
+
+# Basic Conversion
+print "\nBasic Conversion test\n\n";
+
+# I gave up simple literal quote because there are big difference
+# on perl4 and perl5 on literal quote. Of course we cannot use
+# jperl.
+
+$example{'jis'} = unpack('u',<<'eofeof');
+M1FER<W0@4W1A9V4@&R1"(3DQ(3%^2R%+?D]3&RA"(%-E8V]N9"!3=&%G92`;
+M)$)0)TU:&RA"($AI<F%G86YA(!LD0B0B)"0D)B0H)"HD;R1R)',;*$(*2V%T
+M86MA;F$@&R1")2(E)"4F)2@E*B5O)7(E<QLH0B!+:6=O=2`;)$(A)B%G(S`C
+/029!)E@G(B=!*$`;*$(*
+eofeof
+
+$example{'sjis'} = unpack('u',<<'eofeof');
+M1FER<W0@4W1A9V4@@5B)0(F>ED"6GIAR(%-E8V]N9"!3=&%G92"8I9=Y($AI
+M<F%G86YA((*@@J*"I(*F@JB"[8+P@O$*2V%T86MA;F$@@T&#0X-%@T>#28./
+>@Y*#DR!+:6=O=2"!18&'@D^"8(._@]:$081@A+X*
+eofeof
+
+$example{'euc'} = unpack('u',<<'eofeof');
+M1FER<W0@4W1A9V4@H;FQH;'^RZ'+_L_3(%-E8V]N9"!3=&%G92#0I\W:($AI
+M<F%G86YA(*2BI*2DIJ2HI*JD[Z3RI/,*2V%T86MA;F$@I:*EI*6FI:BEJJ7O
+>I?*E\R!+:6=O=2"AIJ'GH["CP:;!IMBGHJ?!J,`*
+eofeof
+
+$example{'utf'} = unpack('u',<<'eofeof');
+M1FER<W0@4W1A9V4@XX"%Z9FBY;^<YK.5YKJ`Z(65(%-E8V]N9"!3=&%G92#D
+MN+SI@:4@2&ER86=A;F$@XX&"XX&$XX&&XX&(XX&*XX*/XX*2XX*3"DMA=&%K
+M86YA(.."HN."I.."IN."J.."JN.#K^.#LN.#LR!+:6=O=2#C@[OBB)[OO)#O
+.O*'.L<^)T)'0K^*5@@H`
+eofeof
+
+
+$example{'jis1'} = unpack('u',<<'eofeof');
+M&R1";3%Q<$$L&RA""ALD0F4Z3F\;*$(*&R1"<FT;*$()&R1"/F5.3D]+&RA"
+#"0D*
+eofeof
+
+$example{'sjis1'} = unpack('u',<<'eofeof');
+8YU#ID)%+"N-9E^T*Z>L)C^.7S)AJ"0D*
+eofeof
+
+$example{'euc1'} = unpack('u',<<'eofeof');
+8[;'Q\,&L"N6ZSN\*\NT)ON7.SL_+"0D*
+eofeof
+
+$example{'utf1'} = unpack('u',<<'eofeof');
+AZ+J%Z:N/Z8JM"N>VNNFZEPKIM(D)Y+B*Z:"8Y+J8"0D*
+eofeof
+
+$example{'jis2'} = unpack('u',<<'eofeof');
++&R1".EA&(QLH0@H`
+eofeof
+
+$example{'sjis2'} = unpack('u',<<'eofeof');
+%C=:3H0H`
+eofeof
+
+$example{'euc2'} = unpack('u',<<'eofeof');
+%NMC&HPH`
+eofeof
+
+$example{'utf2'} = unpack('u',<<'eofeof');
+'YI:.Z)>D"@``
+eofeof
+
+# From JIS
+
+print "JIS  to JIS ... ";&test("$nkf   ",$example{'jis'},$example{'jis'});
+print "JIS  to SJIS... ";&test("$nkf -s",$example{'jis'},$example{'sjis'});
+print "JIS  to EUC ... ";&test("$nkf -e",$example{'jis'},$example{'euc'});
+print "JIS  to UTF8... ";&test("$nkf -w",$example{'jis'},$example{'utf'});
+
+# From SJIS
+
+print "SJIS to JIS ... ";&test("$nkf -j",$example{'sjis'},$example{'jis'});
+print "SJIS to SJIS... ";&test("$nkf -s",$example{'sjis'},$example{'sjis'});
+print "SJIS to EUC ... ";&test("$nkf -e",$example{'sjis'},$example{'euc'});
+print "SJIS to UTF8... ";&test("$nkf -w",$example{'sjis'},$example{'utf'});
+
+# From EUC
+
+print "EUC  to JIS ... ";&test("$nkf   ",$example{'euc'},$example{'jis'});
+print "EUC  to SJIS... ";&test("$nkf -s",$example{'euc'},$example{'sjis'});
+print "EUC  to EUC ... ";&test("$nkf -e",$example{'euc'},$example{'euc'});
+print "EUC  to UTF8... ";&test("$nkf -w",$example{'euc'},$example{'utf'});
+
+# From UTF8
+
+print "UTF8 to JIS ... ";&test("$nkf   ",$example{'utf'},$example{'jis'});
+print "UTF8 to SJIS... ";&test("$nkf -s",$example{'utf'},$example{'sjis'});
+print "UTF8 to EUC ... ";&test("$nkf -e",$example{'utf'},$example{'euc'});
+print "UTF8 to UTF8... ";&test("$nkf -w",$example{'utf'},$example{'utf'});
+
+
+
+# From JIS
+
+print "JIS  to JIS ... ";&test("$nkf   ",$example{'jis1'},$example{'jis1'});
+print "JIS  to SJIS... ";&test("$nkf -s",$example{'jis1'},$example{'sjis1'});
+print "JIS  to EUC ... ";&test("$nkf -e",$example{'jis1'},$example{'euc1'});
+print "JIS  to UTF8... ";&test("$nkf -w",$example{'jis1'},$example{'utf1'});
+
+# From SJIS
+
+print "SJIS to JIS ... ";&test("$nkf -j",$example{'sjis1'},$example{'jis1'});
+print "SJIS to SJIS... ";&test("$nkf -s",$example{'sjis1'},$example{'sjis1'});
+print "SJIS to EUC ... ";&test("$nkf -e",$example{'sjis1'},$example{'euc1'});
+print "SJIS to UTF8... ";&test("$nkf -w",$example{'sjis1'},$example{'utf1'});
+
+# From EUC
+
+print "EUC  to JIS ... ";&test("$nkf   ",$example{'euc1'},$example{'jis1'});
+print "EUC  to SJIS... ";&test("$nkf -s",$example{'euc1'},$example{'sjis1'});
+print "EUC  to EUC ... ";&test("$nkf -e",$example{'euc1'},$example{'euc1'});
+print "EUC  to UTF8... ";&test("$nkf -w",$example{'euc1'},$example{'utf1'});
+
+# From UTF8
+
+print "UTF8 to JIS ... ";&test("$nkf   ",$example{'utf1'},$example{'jis1'});
+print "UTF8 to SJIS... ";&test("$nkf -s",$example{'utf1'},$example{'sjis1'});
+print "UTF8 to EUC ... ";&test("$nkf -e",$example{'utf1'},$example{'euc1'});
+print "UTF8 to UTF8... ";&test("$nkf -w",$example{'utf1'},$example{'utf1'});
+
+# Ambigous Case
+
+$example{'amb'} = unpack('u',<<'eofeof');
+MI<*PL:7"L+&EPK"QI<*PL:7"L+&EPK"QI<*PL:7"L+&EPK"QI<*PL:7"L+&E
+MPK"QI<*PL:7"L+&EPK"QI<(*I<*PL:7"L+&EPK"QI<*PL:7"L+&EPK"QI<*P
+ML:7"L+&EPK"QI<*PL:7"L+&EPK"QI<*PL:7"L+&EPK"QI<(*I<*PL:7"L+&E
+MPK"QI<*PL:7"L+&EPK"QI<*PL:7"L+&EPK"QI<*PL:7"L+&EPK"QI<*PL:7"
+ML+&EPK"QI<(*I<*PL:7"L+&EPK"QI<*PL:7"L+&EPK"QI<*PL:7"L+&EPK"Q
+MI<*PL:7"L+&EPK"QI<*PL:7"L+&EPK"QI<(*I<*PL:7"L+&EPK"QI<*PL:7"
+ML+&EPK"QI<*PL:7"L+&EPK"QI<*PL:7"L+&EPK"QI<*PL:7"L+&EPK"QI<(*
+eofeof
+
+$example{'amb.euc'} = unpack('u',<<'eofeof');
+M&R1")4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25"
+M,#$E0C`Q)4(P,25",#$E0C`Q)4(;*$(*&R1")4(P,25",#$E0C`Q)4(P,25"
+M,#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(;
+M*$(*&R1")4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P
+M,25",#$E0C`Q)4(P,25",#$E0C`Q)4(;*$(*&R1")4(P,25",#$E0C`Q)4(P
+M,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q
+M)4(;*$(*&R1")4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q
+>)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(;*$(*
+eofeof
+
+$example{'amb.sjis'} = unpack('u',<<'eofeof');
+M&RA))4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25"
+M,#$E0C`Q)4(P,25",#$E0C`Q)4(;*$(*&RA))4(P,25",#$E0C`Q)4(P,25"
+M,#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(;
+M*$(*&RA))4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P
+M,25",#$E0C`Q)4(P,25",#$E0C`Q)4(;*$(*&RA))4(P,25",#$E0C`Q)4(P
+M,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q
+M)4(;*$(*&RA))4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q
+>)4(P,25",#$E0C`Q)4(P,25",#$E0C`Q)4(;*$(*
+eofeof
+
+print "Ambiguous Case. ";
+    &test("$nkf",$example{'amb'},$example{'amb.euc'});
+
+# Input assumption
+
+print "SJIS  Input assumption ";
+    &test("$nkf -Sx",$example{'amb'},$example{'amb.sjis'});
+
+# Broken JIS
+
+print "Broken JIS ";
+    $input = $example{'jis'};
+    $input =~ s/\033//g;
+    &test("$nkf -Be",$input,$example{'euc'});
+print "Broken JIS is safe on Normal JIS? ";
+    $input = $example{'jis'};
+    &test("$nkf -Be",$input,$example{'euc'});
+
+# X0201 \e$B2>L>\e(B
+# X0201->X0208 conversion
+# X0208 aphabet -> ASCII
+# X0201 \e$BAj8_JQ49\e(B
+
+print "\nX0201 test\n\n";
+
+$example{'x0201.sjis'} = unpack('u',<<'eofeof');
+MD5.*<(-*@TR#3H-0@U*#2X--@T^#48-3"I%3B7""8()A@F*"8X)D@F6"9H*!
+M@H*"@X*$@H6"AH*'"I%3BTR-AH%)@9>!E(&0@9.!3X&5@9:!:8%J@7R!>X&!
+M@6V!;H%O@7"!CPJ4O(IPMK>X/;FZMMZWWKC>N=ZZWH+&"I2\BG#*W\O?S-_-
+MW\[?M]^QW@K*W\O?S`IH86YK86MU(,K?R]_,I`K*W\O?S-VA"I2\BG""S(SC
+!"@!"
+eofeof
+
+$example{'x0201.euc'} = unpack('u',<<'eofeof');
+MP;2ST:6KI:VEKZ6QI;.EK*6NI;"ELJ6T"L&TL=&CP:/"H\.CQ*/%H\:CQZ/A
+MH^*CXZ/DH^6CYJ/G"L&TM:VYYJ&JH?>A]*'PH?.AL*'UH?:ARJ'+H=VAW*'A
+MH<ZASZ'0H=&A[PK(OK/1CK:.MXZX/8ZYCKJ.MH[>CK>.WHZXCMZ.N8[>CKJ.
+MWJ3("LB^L]&.RH[?CLN.WX[,CM^.S8[?CLZ.WXZWCM^.L8[>"H[*CM^.RX[?
+MCLP*:&%N:V%K=2".RH[?CLN.WX[,CJ0*CLJ.WX[+CM^.S([=CJ$*R+ZST:3.
+#N.4*
+eofeof
+
+$example{'x0201.utf'} = unpack('u',<<'eofeof');
+MY86HZ*>2XX*KXX*MXX*OXX*QXX*SXX*LXX*NXX*PXX*RXX*T"N6%J.B+L>^\
+MH>^\HN^\H^^\I.^\I>^\IN^\I^^]@>^]@N^]@^^]A.^]A>^]AN^]APKEA:CH
+MJ)CEC[?OO('OO*#OO(/OO(3OO(7OO+[OO(;OO(KOO(COO(GBB)+OO(OOO)WO
+MO+OOO+WOO9OOO9WOOZ4*Y8V*Z*>2[[VV[[VW[[VX/>^]N>^]NN^]MN^^GN^]
+MM^^^GN^]N.^^GN^]N>^^GN^]NN^^GN.!J`KEC8KHIY+OOHKOOI_OOHOOOI_O
+MOHSOOI_OOHWOOI_OOH[OOI_OO;?OOI_OO;'OOIX*[[Z*[[Z?[[Z+[[Z?[[Z,
+M"FAA;FMA:W4@[[Z*[[Z?[[Z+[[Z?[[Z,[[VD"N^^BN^^G^^^B^^^G^^^C.^^
+2G>^]H0KEC8KHIY+C@:[EOHP*
+eofeof
+
+$example{'x0201.jis'} = unpack('u',<<'eofeof');
+M&R1"030S424K)2TE+R4Q)3,E+"4N)3`E,B4T&RA""ALD0D$T,5$C02-"(T,C
+M1"-%(T8C1R-A(V(C8R-D(V4C9B-G&RA""ALD0D$T-2TY9B$J(7<A="%P(7,A
+M,"%U(78A2B%+(5TA7"%A(4XA3R%0(5$A;QLH0@H;)$)(/C-1&RA)-C<X&RA"
+M/1LH23DZ-EXW7CA>.5XZ7ALD0B1(&RA""ALD0D@^,U$;*$E*7TM?3%]-7TY?
+M-U\Q7ALH0@H;*$E*7TM?3!LH0@IH86YK86MU(!LH24I?2U],)!LH0@H;*$E*
+97TM?3%TA&RA""ALD0D@^,U$D3CAE&RA""@``
+eofeof
+
+$example{'x0201.sosi'} = unpack('u',<<'eofeof');
+M&R1"030S424K)2TE+R4Q)3,E+"4N)3`E,B4T&RA*"ALD0D$T,5$C02-"(T,C
+M1"-%(T8C1R-A(V(C8R-D(V4C9B-G&RA*"ALD0D$T-2TY9B$J(7<A="%P(7,A
+M,"%U(78A2B%+(5TA7"%A(4XA3R%0(5$A;QLH2@H;)$)(/C-1&RA*#C8W.`\;
+M*$H]#CDZ-EXW7CA>.5XZ7@\;)$(D2!LH2@H;)$)(/C-1&RA*#DI?2U],7TU?
+M3E\W7S%>#PH.2E]+7TP/&RA*"FAA;FMA:W4@#DI?2U],)`\;*$H*#DI?2U],
+672$/&RA*"ALD0D@^,U$D3CAE&RA""@``
+eofeof
+
+$example{'x0201.x0208'} = unpack('u',<<'eofeof');
+M&R1"030S424K)2TE+R4Q)3,E+"4N)3`E,B4T&RA""ALD0D$T,5$;*$)!0D-$
+M149'86)C9&5F9PH;)$)!-#4M.68;*$(A0",D)5XF*B@I+2L]6UU[?1LD0B%O
+M&RA""ALD0D@^,U$E*R4M)2\;*$(]&R1")3$E,R4L)2XE,"4R)30D2!LH0@H;
+M)$)(/C-1)5$E5"57)5HE724M(2PE(B$K&RA""ALD0B51)50E51LH0@IH86YK
+M86MU(!LD0B51)50E52$B&RA""ALD0B51)50E525S(2,;*$(*&R1"2#XS421.
+&.&4;*$(*
+eofeof
+
+# -X is necessary to allow X0201 in SJIS
+# -Z convert X0208 alphabet to ASCII
+print "X0201 conversion: SJIS ";
+    &test("$nkf -XZ",$example{'x0201.sjis'},$example{'x0201.x0208'});
+print "X0201 conversion: JIS  ";
+    &test("$nkf -Z",$example{'x0201.jis'},$example{'x0201.x0208'});
+print "X0201 conversion:SI/SO ";
+    &test("$nkf -Z",$example{'x0201.sosi'},$example{'x0201.x0208'});
+print "X0201 conversion: EUC  ";
+    &test("$nkf -Z",$example{'x0201.euc'},$example{'x0201.x0208'});
+print "X0201 conversion: UTF8 ";
+    &test("$nkf -Z",$example{'x0201.utf'},$example{'x0201.x0208'});
+# -x means X0201 output
+print "X0201 output: SJIS     ";
+    &test("$nkf -xs",$example{'x0201.euc'},$example{'x0201.sjis'});
+print "X0201 output: JIS      ";
+    &test("$nkf -xj",$example{'x0201.sjis'},$example{'x0201.jis'});
+print "X0201 output: EUC      ";
+    &test("$nkf -xe",$example{'x0201.jis'},$example{'x0201.euc'});
+print "X0201 output: UTF8     ";
+    &test("$nkf -xw",$example{'x0201.jis'},$example{'x0201.utf'});
+
+# MIME decode
+
+print "\nMIME test\n\n";
+
+# MIME ISO-2022-JP
+
+$example{'mime.iso2022'} = unpack('u',<<'eofeof');
+M/3])4T\M,C`R,BU*4#]"/T=Y4D%.144W96E23TI566Q/4U9)1WEH2S\]"CT_
+M:7-O+3(P,C(M2E`_0C]'>5)!3D5%-V5I4D]*55EL3U-624=Y:$L_/0H]/VES
+M;RTR,#(R+4I0/U$_/3%")$(D1B11/3%"*$)?96YD/ST*&R1`)#TD)B0K)$H;
+M*$H@/3])4T\M,C`R,BU*4#]"/T=Y4D%.144W96E23U!Y:S=D:'-O4V<]/3\]
+M(&5N9"!O9B!L:6YE"CT_25-/+3(P,C(M2E`_0C]'>5)!3D5%-V5I4D]0>6LW
+M9&AS;U-G/3T_/2`]/TE33RTR,#(R+4I0/T(_1WE204Y%13=E:5)/4'EK-V1H
+M<V]39ST]/ST*0G)O:V5N(&-A<V4*/3])4T\M,C`R,BU*4#]"/T=Y4D%.144W
+M96E23U!Y:S=D"FAS;U-G/3T_/2`]/TE33RTR,`HR,BU*4#]"/T=Y4D%.144W
+M96E23U!Y:S=D:'-O4V<]/3\]"CT_25-/+3(P,C(M2E`_0C]'>5)!3D5%-V5I
+44D]*55EL3QM;2U-624=Y:$L_/0H_
+eofeof
+
+$example{'mime.ans.strict'} = unpack('u',<<'eofeof');
+M&R1"-$$[>B1.)48E.25(&RA""ALD0C1!.WHD3B5&)3DE2!LH0@H;)$(D1B11
+M&RA"(&5N9`H;)$(D/20F)"LD2ALH0B`;)$(T03MZ)$X_*3MV&RA"96YD(&]F
+M(&QI;F4*&R1"-$$[>B1./RD[=C1!.WHD3C\I.W8;*$(*0G)O:V5N(&-A<V4*
+M/3])4T\M,C`R,BU*4#]"/T=Y4D%.144W96E23U!Y:S=D"FAS;U-G/3T_/2`]
+M/TE33RTR,`HR,BU*4#]"/T=Y4D%.144W96E23U!Y:S=D:'-O4V<]/3\]"CT_
+L25-/+3(P,C(M2E`_0C]'>5)!3D5%-V5I4D]*55EL3QM;2U-624=Y:$L_/0H_
+eofeof
+
+$example{'mime.unbuf.strict'} = unpack('u',<<'eofeof');
+M&R1"-$$[>B1.)48E.25(&RA""ALD0C1!.WHD3B5&)3DE2!LH0@H;)$(D1B11
+M&RA"(&5N9`H;)$(D/20F)"LD2ALH0B`;)$(T03MZ)$X_*3MV&RA"96YD(&]F
+M(&QI;F4*&R1"-$$[>B1./RD[=C1!.WHD3C\I.W8;*$(*0G)O:V5N(&-A<V4*
+M&R1"-$$[>B1./RD;*$)H<V]39ST]/ST@/3])4T\M,C`*,C(M2E`_0C]'>5)!
+M3D5%-V5I4D]0>6LW9&AS;U-G/3T_/0H;)$(T03MZ)$XE1ALH0EM+4U9)1WEH
+$2S\]"F5I
+eofeof
+
+$example{'mime.ans'} = unpack('u',<<'eofeof');
+M&R1"-$$[>B1.)48E.25(&RA""ALD0C1!.WHD3B5&)3DE2!LH0@H;)$(D1B11
+M&RA"(&5N9`H;)$(D/20F)"LD2ALH0B`;)$(T03MZ)$X_*3MV&RA"96YD(&]F
+M(&QI;F4*&R1"-$$[>B1./RD[=C1!.WHD3C\I.W8;*$(*0G)O:V5N(&-A<V4*
+M&R1"-$$[>B1./RD;*$)H<V]39ST]/ST@&R1"-$$[>B1./RD[=ALH0@H;)$(T
+603MZ)$XE1ALH0EM+4U9)1WEH2S\]"@`*
+eofeof
+
+$example{'mime.unbuf'} = unpack('u',<<'eofeof');
+M&R1"-$$[>B1.)48E.25(&RA""ALD0C1!.WHD3B5&)3DE2!LH0@H;)$(D1B11
+M&RA"(&5N9`H;)$(D/20F)"LD2ALH0B`;)$(T03MZ)$X_*3MV&RA"96YD(&]F
+M(&QI;F4*&R1"-$$[>B1./RD[=C1!.WHD3C\I.W8;*$(*0G)O:V5N(&-A<V4*
+M&R1"-$$[>B1./RD;*$)H<V]39ST]/ST@&R1"-$$[>B1./RD[=ALH0@H;)$(T
+603MZ)$XE1ALH0EM+4U9)1WEH2S\]"@`*
+eofeof
+
+$example{'mime.base64'} = unpack('u',<<'eofeof');
+M9W-M5"])3&YG<FU#>$I+-&=Q=4,S24LS9W%Q0E%:3TUI-39,,S0Q-&=S5T)1
+M43!+9VUA1%9O3T@*9S)+1%1O3'=K8C)1;$E+;V=Q2T-X24MG9W5M0W%*3EEG
+<<T=#>$E+9V=U;4,X64Q&9W)70S592VMG<6U""F=Q
+eofeof
+
+$example{'mime.base64.ans'} = unpack('u',<<'eofeof');
+M&R1")$M&?B1I)#LD1D0Z)"TD7B0Y)"PA(D5L-7XV83E9)$<A(ALH0@T*&R1"
+M(T<E-R5G)4,E+R1R0C\_="0J)"0D1B0B)&LD*D4Y)$,D1B0B)&LD<R1')#<D
+(9R0F)"L;*$(E
+eofeof
+
+# print "Next test is expected to Fail.\n";
+print "MIME decode (strict)   ";
+    $tmp = &test("$nkf -mS",$example{'mime.iso2022'},$example{'mime.ans.strict'});
+
+$example{'mime.ans.alt'} = unpack('u',<<'eofeof');
+M&R1"-$$[>B1.)48E.25(&RA""ALD0C1!.WHD3B5&)3DE2!LH0@H;)$(D1B11
+M&RA"96YD"ALD0B0])"8D*R1*&RA"&R1"-$$[>B1./RD[=ALH0F5N9&]F;&EN
+M90H;)$(T03MZ)$X_*3MV-$$[>B1./RD[=ALH0@I"<F]K96YC87-E"ALD0C1!
+H.WHD3C\I.W8T03MZ)$X_*3MV&RA""ALD0C1!.WHD3B5&)3DE)!LH0@``
+eofeof
+
+$example{'mime.unbuf.alt'} = unpack('u',<<'eofeof');
+M&R1"-$$[>B1.)48E.25(&RA""ALD0C1!.WHD3B5&)3DE2!LH0@H;)$(D1B11
+M&RA"96YD"ALD0B0])"8D*R1*&RA"&R1"-$$[>B1./RD[=ALH0F5N9&]F;&EN
+M90H;)$(T03MZ)$X_*3MV-$$[>B1./RD[=ALH0@I"<F]K96YC87-E"ALD0C1!
+H.WHD3C\I.W8T03MZ)$X_*3MV&RA""ALD0C1!.WHD3B5&)3DE)!LH0@``
+eofeof
+
+print "MIME decode (nonstrict)";
+    $tmp = &test("$nkf -mN",$example{'mime.iso2022'},$example{'mime.ans'},$example{'mime.ans.alt'});
+    # open(OUT,">tmp1");print OUT pack('u',$tmp);close(OUT);
+# unbuf mode implies more pessimistic decode
+print "MIME decode (unbuf)    ";
+    $tmp = &test("$nkf -mNu",$example{'mime.iso2022'},$example{'mime.unbuf'},$example{'mime.unbuf.alt'});
+    # open(OUT,">tmp2");print OUT pack('u',$tmp);close(OUT);
+print "MIME decode (base64)   ";
+    &test("$nkf -mB",$example{'mime.base64'},$example{'mime.base64.ans'});
+
+# MIME ISO-8859-1
+
+$example{'mime.is8859'} = unpack('u',<<'eofeof');
+M/3])4T\M.#@U.2TQ/U$_*CU#-V%V83\_/2`*4&5E<B!4]G)N9W)E;@I,87-S
+M92!(:6QL97+X92!0971E<G-E;B`@7"`B36EN(&MA97!H97-T(&AA<B!F86%E
+M="!E="!F;V5L(2(*06%R:'5S(%5N:79E<G-I='DL($1%3DU!4DL@(%P@(DUI
+<;B!KYG!H97-T(&AA<B!FY65T(&5T(&;X;"$B"@!K
+eofeof
+
+$example{'mime.is8859.ans'} = unpack('u',<<'eofeof');
+M*L=A=F$_(`I0965R(%3V<FYG<F5N"DQA<W-E($AI;&QE<OAE(%!E=&5R<V5N
+M("!<(")-:6X@:V%E<&AE<W0@:&%R(&9A865T(&5T(&9O96PA(@I!87)H=7,@
+M56YI=F5R<VET>2P@1$5.34%22R`@7"`B36EN(&OF<&AE<W0@:&%R(&;E970@
+)970@9OAL(2(*
+eofeof
+
+# Without -l, ISO-8859-1 was handled as X0201.
+
+print "MIME ISO-8859-1 (Q)    ";
+    &test("$nkf -ml",$example{'mime.is8859'},$example{'mime.is8859.ans'});
+
+# test for -f is not so simple.
+
+print "\nBug Fixes\n\n";
+
+# test_data/cr
+
+$example{'test_data/cr'} = unpack('u',<<'eofeof');
+1I,:DN:3(#71E<W0-=&5S=`T`
+eofeof
+
+$example{'test_data/cr.ans'} = unpack('u',<<'eofeof');
+7&R1")$8D.21(&RA""G1E<W0*=&5S=`H`
+eofeof
+
+print "test_data/cr    ";
+    &test("$nkf -d",$example{'test_data/cr'},$example{'test_data/cr.ans'});
+# test_data/fixed-qencode
+
+$example{'test_data/fixed-qencode'} = unpack('u',<<'eofeof');
+M("`@("`@("`],4(D0CYE/STS1#TQ0BA""B`@("`@("`@/3%")$(^93TS1CTS
+'1#TQ0BA""@``
+eofeof
+
+$example{'test_data/fixed-qencode.ans'} = unpack('u',<<'eofeof');
+F("`@("`@("`;)$(^93\]&RA""B`@("`@("`@&R1"/F4_/1LH0@H`
+eofeof
+
+print "test_data/fixed-qencode    ";
+    &test("$nkf -mQ",$example{'test_data/fixed-qencode'},$example{'test_data/fixed-qencode.ans'});
+# test_data/long-fold-1
+
+$example{'test_data/long-fold-1'} = unpack('u',<<'eofeof');
+MI,JDK*2DI,JDK*2DI,JDK*'!I*2DKJ3GI*:DK*2BI.JDWJ2WI,:AHJ2SI.RD
+M\J2]I,ZDWJ3>I**DQ*2KI*:DR*&BI,FDIJ3BI-^DT*2HI*RD[Z3KI*2DMZ&B
+MI,BDP:3EI*:DQZ3!I.>D\Z2NI.RDZZ2KI.*DMZ3SI,JDI*&C"J2SI+.DS\.[
+'I*2YU*&C"@``
+eofeof
+
+$example{'test_data/long-fold-1.ans'} = unpack('u',<<'eofeof');
+M&R1")$HD+"0D)$HD+"0D)$HD+"%!)"0D+B1G)"8D+"0B)&HD7B0W)$8A(B0S
+M)&PD<B0])$XD7B1>)"(D1"0K&RA""ALD0B0F)$@A(B1))"8D8B1?)%`D*"0L
+M)&\D:R0D)#<A(B1()$$D920F)$<D021G)',D+B1L)&LD*R1B)#<D<QLH0@H;
+A)$(D2B0D(2,;*$(*&R1")#,D,R1/0SLD)#E4(2,;*$(*
+eofeof
+
+print "test_data/long-fold-1    ";
+    &test("$nkf -F60",$example{'test_data/long-fold-1'},$example{'test_data/long-fold-1.ans'});
+# test_data/long-fold
+
+$example{'test_data/long-fold'} = unpack('u',<<'eofeof');
+MI,JDK*2DI,JDK*2DI,JDK*'!I*2DKJ3GI*:DK*2BI.JDWJ2WI,:AHJ2SI.RD
+M\J2]I,ZDWJ3>I**DQ*2KI*:DR*&BI,FDIJ3BI-^DT*2HI*RD[Z3KI*2DMZ&B
+MI,BDP:3EI*:DQZ3!I.>D\Z2NI.RDZZ2KI.*DMZ3SI,JDI*&C"J2SI+.DS\.[
+'I*2YU*&C"@``
+eofeof
+
+$example{'test_data/long-fold.ans'} = unpack('u',<<'eofeof');
+M&R1")$HD+"0D)$HD+"0D)$HD+"%!)"0D+B1G)"8D+"0B)&HD7B0W)$8A(B0S
+M)&PD<B0])$XD7B1>)"(D1"0K&RA""ALD0B0F)$@A(B1))"8D8B1?)%`D*"0L
+M)&\D:R0D)#<A(B1()$$D920F)$<D021G)',D+B1L)&LD*R1B)#<D<QLH0@H;
+:)$(D2B0D(2,D,R0S)$]#.R0D.50A(QLH0@H`
+eofeof
+
+print "test_data/long-fold    ";
+    &test("$nkf -f60",$example{'test_data/long-fold'},$example{'test_data/long-fold.ans'});
+# test_data/mime_out
+
+$example{'test_data/mime_out'} = unpack('u',<<'eofeof');
+M"BTM+2T*4W5B:F5C=#H@86%A82!A86%A(&%A86$@86%A82!A86%A(&%A86$@
+M86%A82!A86%A(&%A86$@86%A82!A86%A(&%A86$@86%A82!A86%A"BTM+2T*
+M4W5B:F5C=#H@I**DI*2FI*BDJJ2KI*VDKZ2QI+.DM:2WI+FDNZ2]I+^DP:3$
+MI,:DR*3*I,NDS*3-I,ZDSZ32I-6DV*3;I-ZDWZ3@I.&DXJ3DI*2DYJ2HI.@*
+M+2TM+0I3=6)J96-T.B!A86%A(&%A86$@86%A82!A86%A(&%A86$@86%A82!A
+I86%A(*2BI*2DIJ2HI*H@86%A82!A86%A(&%A86$@86%A80HM+2TM"@H`
+eofeof
+
+$example{'test_data/mime_out.ans'} = unpack('u',<<'eofeof');
+M"BTM+2T*4W5B:F5C=#H@86%A82!A86%A(&%A86$@86%A82!A86%A(&%A86$@
+M86%A82!A86%A(&%A86$*(&%A86$@86%A82!A86%A(&%A86$@86%A80HM+2TM
+M"E-U8FIE8W0Z(#T_25-/+3(P,C(M2E`_0C]'>5)#2D-):TI#46U*0V=K2VE1
+M<DI#,&M,>5%X2D1-:TY343-*1&MK3WAS;U%G/3T_/2`*(#T_25-/+3(P,C(M
+M2E`_0C]'>5)#2D0P:U!Y4D)*15%K4FE224I%;VM3>5)-2D4P:U1I4E!*1DEK
+M5E-264=Y:$,_/2`*(#T_25-/+3(P,C(M2E`_0C]'>5)#2D9S:UAI4F9*1T%K
+M65-2:4I'46M*0U)M2D-G:V%"<V]19ST]/ST@"BTM+2T*4W5B:F5C=#H@86%A
+M82!A86%A(&%A86$@86%A82!A86%A(&%A86$@86%A82`]/TE33RTR,#(R+4I0
+M/T(_1WE20TI#26)+14D]/ST@"B`]/TE33RTR,#(R+4I0/T(_1WE20TI#46M*
+J:5%O2D-O8DM%23T_/2`@86%A80H@86%A82!A86%A(&%A86$*+2TM+0H*
+eofeof
+
+print "test_data/mime_out    ";
+    &test("$nkf -M",$example{'test_data/mime_out'},$example{'test_data/mime_out.ans'});
+# test_data/multi-line
+
+$example{'test_data/multi-line'} = unpack('u',<<'eofeof');
+MI,JDK*2DI,JDK*2DI,JDK*'!I*2DKJ3GI*:DK*2BI.JDWJ2WI,:AH@"DLZ3L
+MI/*DO:3.I-ZDWJ2BI,2DJZ2FI,BAHJ3)I*:DXJ3?I-"DJ*2LI.^DZZ2DI+>A
+MHJ3(I,&DY:2FI,>DP:3GI/.DKJ3LI.NDJZ3BI+>D\Z3*I*2AHPJDLZ2SI,_#
+8NZ2DN=2AHP`*I+.DLZ3/P[NDI+G4H:,*
+eofeof
+
+$example{'test_data/multi-line.ans'} = unpack('u',<<'eofeof');
+MI,JDK*2DI,JDK*2DI,JDK*'!I*2DKJ3GI*:DK*2BI.JDWJ2WI,:AH@"DLZ3L
+MI/*DO:3.I-ZDWJ2BI,2DJZ2FI,BAHJ3)I*:DXJ3?I-"DJ*2LI.^DZZ2DI+>A
+MHJ3(I,&DY:2FI,>DP:3GI/.DKJ3LI.NDJZ3BI+>D\Z3*I*2AHPJDLZ2SI,_#
+8NZ2DN=2AHP`*I+.DLZ3/P[NDI+G4H:,*
+eofeof
+
+print "test_data/multi-line    ";
+    &test("$nkf -e",$example{'test_data/multi-line'},$example{'test_data/multi-line.ans'});
+# test_data/nkf-19-bug-1
+
+$example{'test_data/nkf-19-bug-1'} = unpack('u',<<'eofeof');
+,I*:DJZ2D"KK8QJ,*
+eofeof
+
+$example{'test_data/nkf-19-bug-1.ans'} = unpack('u',<<'eofeof');
+8&R1")"8D*R0D&RA""ALD0CI81B,;*$(*
+eofeof
+
+print "test_data/nkf-19-bug-1    ";
+    &test("$nkf -Ej",$example{'test_data/nkf-19-bug-1'},$example{'test_data/nkf-19-bug-1.ans'});
+# test_data/nkf-19-bug-2
+
+$example{'test_data/nkf-19-bug-2'} = unpack('u',<<'eofeof');
+%I-NDL@H`
+eofeof
+
+$example{'test_data/nkf-19-bug-2.ans'} = unpack('u',<<'eofeof');
+%I-NDL@H`
+eofeof
+
+print "test_data/nkf-19-bug-2    ";
+    &test("$nkf -Ee",$example{'test_data/nkf-19-bug-2'},$example{'test_data/nkf-19-bug-2.ans'});
+# test_data/nkf-19-bug-3
+
+$example{'test_data/nkf-19-bug-3'} = unpack('u',<<'eofeof');
+8[;'Q\,&L"N6ZSN\*\NT)ON7.SL_+"0D*
+eofeof
+
+$example{'test_data/nkf-19-bug-3.ans'} = unpack('u',<<'eofeof');
+8[;'Q\,&L"N6ZSN\*\NT)ON7.SL_+"0D*
+eofeof
+
+print "test_data/nkf-19-bug-3    ";
+    &test("$nkf -e",$example{'test_data/nkf-19-bug-3'},$example{'test_data/nkf-19-bug-3.ans'});
+# test_data/non-strict-mime
+
+$example{'test_data/non-strict-mime'} = unpack('u',<<'eofeof');
+M/3])4T\M,C`R,BU*4#]"/PIG<U-#;V]+.6=R-D-O;TQ%9W1Y0W0T1D-$46].
+M0V\V16=S,D]N;T999S1Y1%=)3$IG=4-0:UD*2W!G<FU#>$E+:6=R,D-V;TMI
+,9W-30V]O3&,*/ST*
+eofeof
+
+$example{'test_data/non-strict-mime.ans'} = unpack('u',<<'eofeof');
+M&R1")$8D)"0_)$`D)"1&)%XD.2$C&RA"#0H-"ALD0CMD)$\[?B$Y)6PE.21+
+<)&(]<20K)#LD1B0D)#\D0"0D)$8D)"1>&RA""@``
+eofeof
+
+print "test_data/non-strict-mime    ";
+    &test("$nkf -mN",$example{'test_data/non-strict-mime'},$example{'test_data/non-strict-mime.ans'});
+# test_data/q-encode-softrap
+
+$example{'test_data/q-encode-softrap'} = unpack('u',<<'eofeof');
+H/3%")$(T03MZ)3T*,R$\)4DD3CTQ0BA""CTQ0B1"2E$T.3TQ0BA""@``
+eofeof
+
+$example{'test_data/q-encode-softrap.ans'} = unpack('u',<<'eofeof');
+>&R1"-$$[>B4S(3PE221.&RA""ALD0DI1-#D;*$(*
+eofeof
+
+print "test_data/q-encode-softrap    ";
+    &test("$nkf -mQ",$example{'test_data/q-encode-softrap'},$example{'test_data/q-encode-softrap.ans'});
+# test_data/rot13
+
+$example{'test_data/rot13'} = unpack('u',<<'eofeof');
+MI+.D\Z3+I,&DSZ&BS:W"]*3(I*2DI*3>I+FAHPH*;FMF('9E<BXQ+CDR(*3R
+MS?C-T:2UI+NDQJ2DI+^DP*2DI,:DI*3>I+FDK*&B05-#24D@I,O"T*2WI,8@
+M4D]4,3,@I*P*P+6DMZ2OQK"DI*3&I*2DRJ2DI.BDIJ3'H:*PRK*\I,ZDZ*2F
+MI,O*T;2YI+6D[*3>I+ND\Z&C"@HE(&5C:&\@)VAO9V4G('P@;FMF("UR"FAO
+#9V4*
+eofeof
+
+$example{'test_data/rot13.ans'} = unpack('u',<<'eofeof');
+M&R1"4V)31%-Z4W!3?E!1?%QQ15-W4U-34U,O4VA04ALH0@H*87AS(&ER92XQ
+M+CDR(!LD0E-#?$E\(E-D4VI3=5-34VY3;U-34W534U,O4VA36U!1&RA"3D90
+M5E8@&R1"4WIQ(5-F4W4;*$(@14)',3,@&R1"4UL;*$(*&R1";V139E->=5]3
+M4U-U4U-3>5-34SE355-V4%%?>6%K4WU3.5-54WIY(F-H4V13/5,O4VI31%!2
+A&RA""@HE(')P=6(@)W5B='(G('P@87AS("UE"G5B='(*
+eofeof
+
+print "test_data/rot13    ";
+    &test("$nkf -r",$example{'test_data/rot13'},$example{'test_data/rot13.ans'});
+# test_data/slash
+
+$example{'test_data/slash'} = unpack('u',<<'eofeof');
+7("`]/U8\5"U5.5=%2RTK.U<U32LE+PH`
+eofeof
+
+$example{'test_data/slash.ans'} = unpack('u',<<'eofeof');
+7("`]/U8\5"U5.5=%2RTK.U<U32LE+PH`
+eofeof
+
+print "test_data/slash    ";
+    &test("$nkf  ",$example{'test_data/slash'},$example{'test_data/slash.ans'});
+# test_data/z1space-0
+
+$example{'test_data/z1space-0'} = unpack('u',<<'eofeof');
+"H:$`
+eofeof
+
+$example{'test_data/z1space-0.ans'} = unpack('u',<<'eofeof');
+"H:$`
+eofeof
+
+print "test_data/z1space-0    ";
+    &test("$nkf -e -Z",$example{'test_data/z1space-0'},$example{'test_data/z1space-0.ans'});
+# test_data/z1space-1
+
+$example{'test_data/z1space-1'} = unpack('u',<<'eofeof');
+"H:$`
+eofeof
+
+$example{'test_data/z1space-1.ans'} = unpack('u',<<'eofeof');
+!(```
+eofeof
+
+print "test_data/z1space-1    ";
+    &test("$nkf -e -Z1",$example{'test_data/z1space-1'},$example{'test_data/z1space-1.ans'});
+# test_data/z1space-2
+
+$example{'test_data/z1space-2'} = unpack('u',<<'eofeof');
+"H:$`
+eofeof
+
+$example{'test_data/z1space-2.ans'} = unpack('u',<<'eofeof');
+"("``
+eofeof
+
+print "test_data/z1space-2    ";
+    &test("$nkf -e -Z2",$example{'test_data/z1space-2'},$example{'test_data/z1space-2.ans'});
+
+# end
diff --git a/nkf_utf8.txt b/nkf_utf8.txt
new file mode 100644 (file)
index 0000000..1383eff
--- /dev/null
@@ -0,0 +1,48 @@
+UTF-8 ¥µ¥Ý¡¼¥È¤Ë¤Ä¤¤¤Æ
+                nkf_utf8-2002.08.22 by furukawa@tcp-ip.or.jp
+
+
+nkf-1.92 ¤ò¥Ù¡¼¥¹¤Ë¡¢UTF-8 Âбþ¤·¤Æ¤ß¤Þ¤·¤¿¡£
+
+nkf ¤òÂбþÈǤËÆþ¤ì´¹¤¨¤ë¤À¤±¤Ç¡¢ÆþÎϤ¬ UTF-8 ¤Ê¤é¤Ð¡¢
+¾¡¼ê¤Ë¼«Æ°È½Ê̤·¤Æ¡¢¥³¡¼¥ÉÊÑ´¹¤Ç¤­¤ë¤³¤È¤òÌÜɸ¤È¤·¤Æ¤¤¤Þ¤¹¡£
+
+
+½¾Íè¤Î nkf ¤ÈƱÍͤˡ¢nkf -e ¤È¤·¤Æµ¯Æ°¤¹¤ë¤È¡¢¼«Æ°È½Ê̤Ç
+UTF-8 ¤ÈȽÄꤵ¤ì¤ì¤Ð¡¢¤½¤Î¤Þ¤Þ euc-jp ¤ËÊÑ´¹¤µ¤ì¤Þ¤¹
+
+
+¥ª¥×¥·¥ç¥ó¤Ç¡¢Ê¸»ú¥³¡¼¥É¤ò»ØÄꤹ¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£
+
+    -w   ½ÐÎϤò utf-8 ¤Ë»ØÄꤷ¤Þ¤¹
+    -W   ÆþÎϤò utf-8 ¤È²¾Äꤷ¤Þ¤¹
+
+¤Þ¤À¥Ð¥°¤¬¤¢¤ë²ÄǽÀ­¤¬¹â¤¤¤Ç¤¹¡£
+(Æä˼«Æ°È½ÊÌ¡¢¥³¡¼¥Éº®ºß¡¢¥¨¥é¡¼½èÍý·Ï)
+
+²¿¤«ÌäÂê¤ò¸«¤Ä¤±¤¿¤é¡¢furukawa@tcp-ip.or.jp ¤Þ¤Ç¸æÏ¢Íí¤ò
+¤ª´ê¤¤¤·¤Þ¤¹¡£
+
+
+
+¤½¤Î¾¡¢nkf-1.92 ¤ËÂФ·¡¢
+
+  ¡¦-Z3 ¥ª¥×¥·¥ç¥ó¤Î¿·Àß
+        X0208 ¤Î '¡ä', '¡ã', '¡É', '¡õ'  ¤ò¤½¤ì¤¾¤ì
+        '&gt;', '&lt;', '&quot;', '&amp;' ¤ËÊÑ´¹¤·¤Þ¤¹
+  ¡¦¤â¤È¤â¤È¤Î nkf 1.92 ¤Ë¤¢¤Ã¤¿¡¢-Z1 ¥ª¥×¥·¥ç¥ó¤Î¥Ð¥°½¤Àµ
+
+¤È¤¤¤¦²þ¤¤ò¤·¤Æ¤¤¤Þ¤¹¡£
+
+<ÍúÎò>
+2002.08.22
+ * ¥³¥ó¥Ñ¥¤¥ë»þ¤Î warning ¤Ø¤ÎÂнè (ÇϾ줵¤ó¤Î¥Ñ¥Ã¥Á¤Ë¤è¤ë)
+ * utf-8 ¤ÎȽÄê¤Î¥Ð¥°½¤Àµ
+    Àµ¤·¤¤Ê¸»ú¥³¡¼¥É¤¬Íè¤Æ¤¤¤ë¤Ö¤ó¤Ë¤ÏÌäÂꤢ¤ê¤Þ¤»¤ó¤¬¡¢
+    ÉÔÀµ¤Ê¥³¡¼¥É¤¬Íè¤Æ¤â¡¢utf-8 ¥â¡¼¥É¤«¤éÈ´¤±¤Ê¤¤²ÄǽÀ­¤¬
+    ¤¢¤ê¤Þ¤·¤¿
+ * wvHtml ¤Î½ÐÎϤؤÎÂнè (ËÌÀîʸ¹§¤µ¤ó¤Î¸æÊó¹ð¤Ë¤è¤ë)
+
+-- 
+Rei FURUKAWA 
+furukawa@tcp-ip.or.jp
diff --git a/test.pl b/test.pl
new file mode 100644 (file)
index 0000000..340f87e
--- /dev/null
+++ b/test.pl
@@ -0,0 +1,79 @@
+#!/usr/bin/perl
+#
+# nkf test program for nkf 2.0
+#    Shinji KONO <kono@ie.u-ryukyu.ac.jp>
+# Sun Aug 18 12:25:40 JST 1996
+# Sun Nov  8 00:16:06 JST 1998
+# Sun Sep  8 14:04:02 JST 2002
+#
+# This is useful when you add new patch on nkf.
+# Since this test is too strict, faileurs may not mean
+# wrong conversion. 
+#
+# nkf 2.0 utf8
+# nkf 1.5 differs on MIME decoding
+# nkf 1.4 passes Basic Conversion tests
+# nkf PDS version passes Basic Conversion tests  using "nkf -iB -oB "
+#
+
+$nkf = "./nkf";
+# $nkf = "doscmd nkf.exe";
+
+# If you want to see the testing process, set next flag.
+
+$detail_all = 0;
+$error_count=1;
+$diff=1;
+
+# &library_test0();
+sub test {
+    &command_test(@_);
+}
+
+sub command_test {
+    local ($nkf,$in,@ans) = @_;
+    local ($result);
+
+    $result = '';
+    open(OUT,"> nkf.in");
+    print OUT $in;
+    close(OUT);
+    system("$nkf <nkf.in >nkf.out");   # easy
+    open(IN,"< nkf.out");
+    while(<IN>) {
+       $result .= $_;
+    }
+    if( $nkf =~ /-m/) {
+       $result =~ s/ //g;
+    }
+    $i = 0;
+    foreach $ans (@ans) {
+       if( $nkf =~ /-m/) {
+           $ans =~ s/ //g;
+       }
+        if ($result eq $ans) {
+           print "Ok\n";
+           return $result;
+       }
+        $i++;
+    }
+    $ans = $ans[0];
+    print "Fail\n";
+    system "mv nkf.in nkf.in.$error_count.bad";
+    system "mv nkf.out nkf.out.$error_count.bad";
+    open(OUT,"> nkf.expect.$error_count.bad");
+    print OUT $ans;
+    close(OUT);
+    $error_count++;
+    if ($diff) {
+       open(R,"|od -c >tmp.result.bad"); print R $result; close(R);
+       open(R,"|od -c >tmp.expect.bad"); print R $ans; close(R);
+       system "diff -c tmp.result.bad tmp.expect.bad";
+    }
+    return $result;
+}
+
+do "nkf_test.pl";
+
+unlink "nkf.in";
+unlink "nkf.out";
diff --git a/utf8tbl.c b/utf8tbl.c
new file mode 100644 (file)
index 0000000..4ad2a5b
--- /dev/null
+++ b/utf8tbl.c
@@ -0,0 +1,4848 @@
+#include "config.h"
+
+#ifdef UTF8_OUTPUT_ENABLE
+unsigned short euc_to_utf8_A1[] = {
+         0x3000, 0x3001, 0x3002, 0xFF0C, 0xFF0E, 0x30FB, 0xFF1A,
+ 0xFF1B, 0xFF1F, 0xFF01, 0x309B, 0x309C, 0x00B4, 0xFF40, 0x00A8,
+ 0xFF3E, 0xFFE3, 0xFF3F, 0x30FD, 0x30FE, 0x309D, 0x309E, 0x3003,
+ 0x4EDD, 0x3005, 0x3006, 0x3007, 0x30FC, 0x2015, 0x2010, 0xFF0F,
+ 0xFF3C, 0x301C, 0x2016, 0xFF5C, 0x2026, 0x2025, 0x2018, 0x2019,
+ 0x201C, 0x201D, 0xFF08, 0xFF09, 0x3014, 0x3015, 0xFF3B, 0xFF3D,
+ 0xFF5B, 0xFF5D, 0x3008, 0x3009, 0x300A, 0x300B, 0x300C, 0x300D,
+ 0x300E, 0x300F, 0x3010, 0x3011, 0xFF0B, 0x2212, 0x00B1, 0x00D7,
+ 0x00F7, 0xFF1D, 0x2260, 0xFF1C, 0xFF1E, 0x2266, 0x2267, 0x221E,
+ 0x2234, 0x2642, 0x2640, 0x00B0, 0x2032, 0x2033, 0x2103, 0xFFE5,
+ 0xFF04, 0x00A2, 0x00A3, 0xFF05, 0xFF03, 0xFF06, 0xFF0A, 0xFF20,
+ 0x00A7, 0x2606, 0x2605, 0x25CB, 0x25CF, 0x25CE, 0x25C7,
+};
+unsigned short euc_to_utf8_A2[] = {
+         0x25C6, 0x25A1, 0x25A0, 0x25B3, 0x25B2, 0x25BD, 0x25BC,
+ 0x203B, 0x3012, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x2208, 0x220B, 0x2286, 0x2287, 0x2282, 0x2283,
+ 0x222A, 0x2229,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x2227, 0x2228, 0x00AC, 0x21D2, 0x21D4, 0x2200,
+ 0x2203,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x2220, 0x22A5, 0x2312, 0x2202,
+ 0x2207, 0x2261, 0x2252, 0x226A, 0x226B, 0x221A, 0x223D, 0x221D,
+ 0x2235, 0x222B, 0x222C,      0,      0,      0,      0,      0,
+      0,      0, 0x212B, 0x2030, 0x266F, 0x266D, 0x266A, 0x2020,
+ 0x2021, 0x00B6,      0,      0,      0,      0, 0x25EF,
+};
+unsigned short euc_to_utf8_A3[] = {
+              0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0xFF10, 0xFF11, 0xFF12, 0xFF13, 0xFF14, 0xFF15, 0xFF16, 0xFF17,
+ 0xFF18, 0xFF19,      0,      0,      0,      0,      0,      0,
+      0, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27,
+ 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F,
+ 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37,
+ 0xFF38, 0xFF39, 0xFF3A,      0,      0,      0,      0,      0,
+      0, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47,
+ 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F,
+ 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57,
+ 0xFF58, 0xFF59, 0xFF5A,      0,      0,      0,      0,
+};
+unsigned short euc_to_utf8_A4[] = {
+         0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047,
+ 0x3048, 0x3049, 0x304A, 0x304B, 0x304C, 0x304D, 0x304E, 0x304F,
+ 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057,
+ 0x3058, 0x3059, 0x305A, 0x305B, 0x305C, 0x305D, 0x305E, 0x305F,
+ 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067,
+ 0x3068, 0x3069, 0x306A, 0x306B, 0x306C, 0x306D, 0x306E, 0x306F,
+ 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077,
+ 0x3078, 0x3079, 0x307A, 0x307B, 0x307C, 0x307D, 0x307E, 0x307F,
+ 0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087,
+ 0x3088, 0x3089, 0x308A, 0x308B, 0x308C, 0x308D, 0x308E, 0x308F,
+ 0x3090, 0x3091, 0x3092, 0x3093,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short euc_to_utf8_A5[] = {
+         0x30A1, 0x30A2, 0x30A3, 0x30A4, 0x30A5, 0x30A6, 0x30A7,
+ 0x30A8, 0x30A9, 0x30AA, 0x30AB, 0x30AC, 0x30AD, 0x30AE, 0x30AF,
+ 0x30B0, 0x30B1, 0x30B2, 0x30B3, 0x30B4, 0x30B5, 0x30B6, 0x30B7,
+ 0x30B8, 0x30B9, 0x30BA, 0x30BB, 0x30BC, 0x30BD, 0x30BE, 0x30BF,
+ 0x30C0, 0x30C1, 0x30C2, 0x30C3, 0x30C4, 0x30C5, 0x30C6, 0x30C7,
+ 0x30C8, 0x30C9, 0x30CA, 0x30CB, 0x30CC, 0x30CD, 0x30CE, 0x30CF,
+ 0x30D0, 0x30D1, 0x30D2, 0x30D3, 0x30D4, 0x30D5, 0x30D6, 0x30D7,
+ 0x30D8, 0x30D9, 0x30DA, 0x30DB, 0x30DC, 0x30DD, 0x30DE, 0x30DF,
+ 0x30E0, 0x30E1, 0x30E2, 0x30E3, 0x30E4, 0x30E5, 0x30E6, 0x30E7,
+ 0x30E8, 0x30E9, 0x30EA, 0x30EB, 0x30EC, 0x30ED, 0x30EE, 0x30EF,
+ 0x30F0, 0x30F1, 0x30F2, 0x30F3, 0x30F4, 0x30F5, 0x30F6,      0,
+      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short euc_to_utf8_A6[] = {
+         0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
+ 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
+ 0x03A0, 0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8,
+ 0x03A9,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
+ 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
+ 0x03C0, 0x03C1, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8,
+ 0x03C9,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short euc_to_utf8_A7[] = {
+         0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401,
+ 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D,
+ 0x041E, 0x041F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425,
+ 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D,
+ 0x042E, 0x042F,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451,
+ 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D,
+ 0x043E, 0x043F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445,
+ 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D,
+ 0x044E, 0x044F,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short euc_to_utf8_A8[] = {
+         0x2500, 0x2502, 0x250C, 0x2510, 0x2518, 0x2514, 0x251C,
+ 0x252C, 0x2524, 0x2534, 0x253C, 0x2501, 0x2503, 0x250F, 0x2513,
+ 0x251B, 0x2517, 0x2523, 0x2533, 0x252B, 0x253B, 0x254B, 0x2520,
+ 0x252F, 0x2528, 0x2537, 0x253F, 0x251D, 0x2530, 0x2525, 0x2538,
+ 0x2542,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short euc_to_utf8_B0[] = {
+         0x4E9C, 0x5516, 0x5A03, 0x963F, 0x54C0, 0x611B, 0x6328,
+ 0x59F6, 0x9022, 0x8475, 0x831C, 0x7A50, 0x60AA, 0x63E1, 0x6E25,
+ 0x65ED, 0x8466, 0x82A6, 0x9BF5, 0x6893, 0x5727, 0x65A1, 0x6271,
+ 0x5B9B, 0x59D0, 0x867B, 0x98F4, 0x7D62, 0x7DBE, 0x9B8E, 0x6216,
+ 0x7C9F, 0x88B7, 0x5B89, 0x5EB5, 0x6309, 0x6697, 0x6848, 0x95C7,
+ 0x978D, 0x674F, 0x4EE5, 0x4F0A, 0x4F4D, 0x4F9D, 0x5049, 0x56F2,
+ 0x5937, 0x59D4, 0x5A01, 0x5C09, 0x60DF, 0x610F, 0x6170, 0x6613,
+ 0x6905, 0x70BA, 0x754F, 0x7570, 0x79FB, 0x7DAD, 0x7DEF, 0x80C3,
+ 0x840E, 0x8863, 0x8B02, 0x9055, 0x907A, 0x533B, 0x4E95, 0x4EA5,
+ 0x57DF, 0x80B2, 0x90C1, 0x78EF, 0x4E00, 0x58F1, 0x6EA2, 0x9038,
+ 0x7A32, 0x8328, 0x828B, 0x9C2F, 0x5141, 0x5370, 0x54BD, 0x54E1,
+ 0x56E0, 0x59FB, 0x5F15, 0x98F2, 0x6DEB, 0x80E4, 0x852D,
+};
+unsigned short euc_to_utf8_B1[] = {
+         0x9662, 0x9670, 0x96A0, 0x97FB, 0x540B, 0x53F3, 0x5B87,
+ 0x70CF, 0x7FBD, 0x8FC2, 0x96E8, 0x536F, 0x9D5C, 0x7ABA, 0x4E11,
+ 0x7893, 0x81FC, 0x6E26, 0x5618, 0x5504, 0x6B1D, 0x851A, 0x9C3B,
+ 0x59E5, 0x53A9, 0x6D66, 0x74DC, 0x958F, 0x5642, 0x4E91, 0x904B,
+ 0x96F2, 0x834F, 0x990C, 0x53E1, 0x55B6, 0x5B30, 0x5F71, 0x6620,
+ 0x66F3, 0x6804, 0x6C38, 0x6CF3, 0x6D29, 0x745B, 0x76C8, 0x7A4E,
+ 0x9834, 0x82F1, 0x885B, 0x8A60, 0x92ED, 0x6DB2, 0x75AB, 0x76CA,
+ 0x99C5, 0x60A6, 0x8B01, 0x8D8A, 0x95B2, 0x698E, 0x53AD, 0x5186,
+ 0x5712, 0x5830, 0x5944, 0x5BB4, 0x5EF6, 0x6028, 0x63A9, 0x63F4,
+ 0x6CBF, 0x6F14, 0x708E, 0x7114, 0x7159, 0x71D5, 0x733F, 0x7E01,
+ 0x8276, 0x82D1, 0x8597, 0x9060, 0x925B, 0x9D1B, 0x5869, 0x65BC,
+ 0x6C5A, 0x7525, 0x51F9, 0x592E, 0x5965, 0x5F80, 0x5FDC,
+};
+unsigned short euc_to_utf8_B2[] = {
+         0x62BC, 0x65FA, 0x6A2A, 0x6B27, 0x6BB4, 0x738B, 0x7FC1,
+ 0x8956, 0x9D2C, 0x9D0E, 0x9EC4, 0x5CA1, 0x6C96, 0x837B, 0x5104,
+ 0x5C4B, 0x61B6, 0x81C6, 0x6876, 0x7261, 0x4E59, 0x4FFA, 0x5378,
+ 0x6069, 0x6E29, 0x7A4F, 0x97F3, 0x4E0B, 0x5316, 0x4EEE, 0x4F55,
+ 0x4F3D, 0x4FA1, 0x4F73, 0x52A0, 0x53EF, 0x5609, 0x590F, 0x5AC1,
+ 0x5BB6, 0x5BE1, 0x79D1, 0x6687, 0x679C, 0x67B6, 0x6B4C, 0x6CB3,
+ 0x706B, 0x73C2, 0x798D, 0x79BE, 0x7A3C, 0x7B87, 0x82B1, 0x82DB,
+ 0x8304, 0x8377, 0x83EF, 0x83D3, 0x8766, 0x8AB2, 0x5629, 0x8CA8,
+ 0x8FE6, 0x904E, 0x971E, 0x868A, 0x4FC4, 0x5CE8, 0x6211, 0x7259,
+ 0x753B, 0x81E5, 0x82BD, 0x86FE, 0x8CC0, 0x96C5, 0x9913, 0x99D5,
+ 0x4ECB, 0x4F1A, 0x89E3, 0x56DE, 0x584A, 0x58CA, 0x5EFB, 0x5FEB,
+ 0x602A, 0x6094, 0x6062, 0x61D0, 0x6212, 0x62D0, 0x6539,
+};
+unsigned short euc_to_utf8_B3[] = {
+         0x9B41, 0x6666, 0x68B0, 0x6D77, 0x7070, 0x754C, 0x7686,
+ 0x7D75, 0x82A5, 0x87F9, 0x958B, 0x968E, 0x8C9D, 0x51F1, 0x52BE,
+ 0x5916, 0x54B3, 0x5BB3, 0x5D16, 0x6168, 0x6982, 0x6DAF, 0x788D,
+ 0x84CB, 0x8857, 0x8A72, 0x93A7, 0x9AB8, 0x6D6C, 0x99A8, 0x86D9,
+ 0x57A3, 0x67FF, 0x86CE, 0x920E, 0x5283, 0x5687, 0x5404, 0x5ED3,
+ 0x62E1, 0x64B9, 0x683C, 0x6838, 0x6BBB, 0x7372, 0x78BA, 0x7A6B,
+ 0x899A, 0x89D2, 0x8D6B, 0x8F03, 0x90ED, 0x95A3, 0x9694, 0x9769,
+ 0x5B66, 0x5CB3, 0x697D, 0x984D, 0x984E, 0x639B, 0x7B20, 0x6A2B,
+ 0x6A7F, 0x68B6, 0x9C0D, 0x6F5F, 0x5272, 0x559D, 0x6070, 0x62EC,
+ 0x6D3B, 0x6E07, 0x6ED1, 0x845B, 0x8910, 0x8F44, 0x4E14, 0x9C39,
+ 0x53F6, 0x691B, 0x6A3A, 0x9784, 0x682A, 0x515C, 0x7AC3, 0x84B2,
+ 0x91DC, 0x938C, 0x565B, 0x9D28, 0x6822, 0x8305, 0x8431,
+};
+unsigned short euc_to_utf8_B4[] = {
+         0x7CA5, 0x5208, 0x82C5, 0x74E6, 0x4E7E, 0x4F83, 0x51A0,
+ 0x5BD2, 0x520A, 0x52D8, 0x52E7, 0x5DFB, 0x559A, 0x582A, 0x59E6,
+ 0x5B8C, 0x5B98, 0x5BDB, 0x5E72, 0x5E79, 0x60A3, 0x611F, 0x6163,
+ 0x61BE, 0x63DB, 0x6562, 0x67D1, 0x6853, 0x68FA, 0x6B3E, 0x6B53,
+ 0x6C57, 0x6F22, 0x6F97, 0x6F45, 0x74B0, 0x7518, 0x76E3, 0x770B,
+ 0x7AFF, 0x7BA1, 0x7C21, 0x7DE9, 0x7F36, 0x7FF0, 0x809D, 0x8266,
+ 0x839E, 0x89B3, 0x8ACC, 0x8CAB, 0x9084, 0x9451, 0x9593, 0x9591,
+ 0x95A2, 0x9665, 0x97D3, 0x9928, 0x8218, 0x4E38, 0x542B, 0x5CB8,
+ 0x5DCC, 0x73A9, 0x764C, 0x773C, 0x5CA9, 0x7FEB, 0x8D0B, 0x96C1,
+ 0x9811, 0x9854, 0x9858, 0x4F01, 0x4F0E, 0x5371, 0x559C, 0x5668,
+ 0x57FA, 0x5947, 0x5B09, 0x5BC4, 0x5C90, 0x5E0C, 0x5E7E, 0x5FCC,
+ 0x63EE, 0x673A, 0x65D7, 0x65E2, 0x671F, 0x68CB, 0x68C4,
+};
+unsigned short euc_to_utf8_B5[] = {
+         0x6A5F, 0x5E30, 0x6BC5, 0x6C17, 0x6C7D, 0x757F, 0x7948,
+ 0x5B63, 0x7A00, 0x7D00, 0x5FBD, 0x898F, 0x8A18, 0x8CB4, 0x8D77,
+ 0x8ECC, 0x8F1D, 0x98E2, 0x9A0E, 0x9B3C, 0x4E80, 0x507D, 0x5100,
+ 0x5993, 0x5B9C, 0x622F, 0x6280, 0x64EC, 0x6B3A, 0x72A0, 0x7591,
+ 0x7947, 0x7FA9, 0x87FB, 0x8ABC, 0x8B70, 0x63AC, 0x83CA, 0x97A0,
+ 0x5409, 0x5403, 0x55AB, 0x6854, 0x6A58, 0x8A70, 0x7827, 0x6775,
+ 0x9ECD, 0x5374, 0x5BA2, 0x811A, 0x8650, 0x9006, 0x4E18, 0x4E45,
+ 0x4EC7, 0x4F11, 0x53CA, 0x5438, 0x5BAE, 0x5F13, 0x6025, 0x6551,
+ 0x673D, 0x6C42, 0x6C72, 0x6CE3, 0x7078, 0x7403, 0x7A76, 0x7AAE,
+ 0x7B08, 0x7D1A, 0x7CFE, 0x7D66, 0x65E7, 0x725B, 0x53BB, 0x5C45,
+ 0x5DE8, 0x62D2, 0x62E0, 0x6319, 0x6E20, 0x865A, 0x8A31, 0x8DDD,
+ 0x92F8, 0x6F01, 0x79A6, 0x9B5A, 0x4EA8, 0x4EAB, 0x4EAC,
+};
+unsigned short euc_to_utf8_B6[] = {
+         0x4F9B, 0x4FA0, 0x50D1, 0x5147, 0x7AF6, 0x5171, 0x51F6,
+ 0x5354, 0x5321, 0x537F, 0x53EB, 0x55AC, 0x5883, 0x5CE1, 0x5F37,
+ 0x5F4A, 0x602F, 0x6050, 0x606D, 0x631F, 0x6559, 0x6A4B, 0x6CC1,
+ 0x72C2, 0x72ED, 0x77EF, 0x80F8, 0x8105, 0x8208, 0x854E, 0x90F7,
+ 0x93E1, 0x97FF, 0x9957, 0x9A5A, 0x4EF0, 0x51DD, 0x5C2D, 0x6681,
+ 0x696D, 0x5C40, 0x66F2, 0x6975, 0x7389, 0x6850, 0x7C81, 0x50C5,
+ 0x52E4, 0x5747, 0x5DFE, 0x9326, 0x65A4, 0x6B23, 0x6B3D, 0x7434,
+ 0x7981, 0x79BD, 0x7B4B, 0x7DCA, 0x82B9, 0x83CC, 0x887F, 0x895F,
+ 0x8B39, 0x8FD1, 0x91D1, 0x541F, 0x9280, 0x4E5D, 0x5036, 0x53E5,
+ 0x533A, 0x72D7, 0x7396, 0x77E9, 0x82E6, 0x8EAF, 0x99C6, 0x99C8,
+ 0x99D2, 0x5177, 0x611A, 0x865E, 0x55B0, 0x7A7A, 0x5076, 0x5BD3,
+ 0x9047, 0x9685, 0x4E32, 0x6ADB, 0x91E7, 0x5C51, 0x5C48,
+};
+unsigned short euc_to_utf8_B7[] = {
+         0x6398, 0x7A9F, 0x6C93, 0x9774, 0x8F61, 0x7AAA, 0x718A,
+ 0x9688, 0x7C82, 0x6817, 0x7E70, 0x6851, 0x936C, 0x52F2, 0x541B,
+ 0x85AB, 0x8A13, 0x7FA4, 0x8ECD, 0x90E1, 0x5366, 0x8888, 0x7941,
+ 0x4FC2, 0x50BE, 0x5211, 0x5144, 0x5553, 0x572D, 0x73EA, 0x578B,
+ 0x5951, 0x5F62, 0x5F84, 0x6075, 0x6176, 0x6167, 0x61A9, 0x63B2,
+ 0x643A, 0x656C, 0x666F, 0x6842, 0x6E13, 0x7566, 0x7A3D, 0x7CFB,
+ 0x7D4C, 0x7D99, 0x7E4B, 0x7F6B, 0x830E, 0x834A, 0x86CD, 0x8A08,
+ 0x8A63, 0x8B66, 0x8EFD, 0x981A, 0x9D8F, 0x82B8, 0x8FCE, 0x9BE8,
+ 0x5287, 0x621F, 0x6483, 0x6FC0, 0x9699, 0x6841, 0x5091, 0x6B20,
+ 0x6C7A, 0x6F54, 0x7A74, 0x7D50, 0x8840, 0x8A23, 0x6708, 0x4EF6,
+ 0x5039, 0x5026, 0x5065, 0x517C, 0x5238, 0x5263, 0x55A7, 0x570F,
+ 0x5805, 0x5ACC, 0x5EFA, 0x61B2, 0x61F8, 0x62F3, 0x6372,
+};
+unsigned short euc_to_utf8_B8[] = {
+         0x691C, 0x6A29, 0x727D, 0x72AC, 0x732E, 0x7814, 0x786F,
+ 0x7D79, 0x770C, 0x80A9, 0x898B, 0x8B19, 0x8CE2, 0x8ED2, 0x9063,
+ 0x9375, 0x967A, 0x9855, 0x9A13, 0x9E78, 0x5143, 0x539F, 0x53B3,
+ 0x5E7B, 0x5F26, 0x6E1B, 0x6E90, 0x7384, 0x73FE, 0x7D43, 0x8237,
+ 0x8A00, 0x8AFA, 0x9650, 0x4E4E, 0x500B, 0x53E4, 0x547C, 0x56FA,
+ 0x59D1, 0x5B64, 0x5DF1, 0x5EAB, 0x5F27, 0x6238, 0x6545, 0x67AF,
+ 0x6E56, 0x72D0, 0x7CCA, 0x88B4, 0x80A1, 0x80E1, 0x83F0, 0x864E,
+ 0x8A87, 0x8DE8, 0x9237, 0x96C7, 0x9867, 0x9F13, 0x4E94, 0x4E92,
+ 0x4F0D, 0x5348, 0x5449, 0x543E, 0x5A2F, 0x5F8C, 0x5FA1, 0x609F,
+ 0x68A7, 0x6A8E, 0x745A, 0x7881, 0x8A9E, 0x8AA4, 0x8B77, 0x9190,
+ 0x4E5E, 0x9BC9, 0x4EA4, 0x4F7C, 0x4FAF, 0x5019, 0x5016, 0x5149,
+ 0x516C, 0x529F, 0x52B9, 0x52FE, 0x539A, 0x53E3, 0x5411,
+};
+unsigned short euc_to_utf8_B9[] = {
+         0x540E, 0x5589, 0x5751, 0x57A2, 0x597D, 0x5B54, 0x5B5D,
+ 0x5B8F, 0x5DE5, 0x5DE7, 0x5DF7, 0x5E78, 0x5E83, 0x5E9A, 0x5EB7,
+ 0x5F18, 0x6052, 0x614C, 0x6297, 0x62D8, 0x63A7, 0x653B, 0x6602,
+ 0x6643, 0x66F4, 0x676D, 0x6821, 0x6897, 0x69CB, 0x6C5F, 0x6D2A,
+ 0x6D69, 0x6E2F, 0x6E9D, 0x7532, 0x7687, 0x786C, 0x7A3F, 0x7CE0,
+ 0x7D05, 0x7D18, 0x7D5E, 0x7DB1, 0x8015, 0x8003, 0x80AF, 0x80B1,
+ 0x8154, 0x818F, 0x822A, 0x8352, 0x884C, 0x8861, 0x8B1B, 0x8CA2,
+ 0x8CFC, 0x90CA, 0x9175, 0x9271, 0x783F, 0x92FC, 0x95A4, 0x964D,
+ 0x9805, 0x9999, 0x9AD8, 0x9D3B, 0x525B, 0x52AB, 0x53F7, 0x5408,
+ 0x58D5, 0x62F7, 0x6FE0, 0x8C6A, 0x8F5F, 0x9EB9, 0x514B, 0x523B,
+ 0x544A, 0x56FD, 0x7A40, 0x9177, 0x9D60, 0x9ED2, 0x7344, 0x6F09,
+ 0x8170, 0x7511, 0x5FFD, 0x60DA, 0x9AA8, 0x72DB, 0x8FBC,
+};
+unsigned short euc_to_utf8_BA[] = {
+         0x6B64, 0x9803, 0x4ECA, 0x56F0, 0x5764, 0x58BE, 0x5A5A,
+ 0x6068, 0x61C7, 0x660F, 0x6606, 0x6839, 0x68B1, 0x6DF7, 0x75D5,
+ 0x7D3A, 0x826E, 0x9B42, 0x4E9B, 0x4F50, 0x53C9, 0x5506, 0x5D6F,
+ 0x5DE6, 0x5DEE, 0x67FB, 0x6C99, 0x7473, 0x7802, 0x8A50, 0x9396,
+ 0x88DF, 0x5750, 0x5EA7, 0x632B, 0x50B5, 0x50AC, 0x518D, 0x6700,
+ 0x54C9, 0x585E, 0x59BB, 0x5BB0, 0x5F69, 0x624D, 0x63A1, 0x683D,
+ 0x6B73, 0x6E08, 0x707D, 0x91C7, 0x7280, 0x7815, 0x7826, 0x796D,
+ 0x658E, 0x7D30, 0x83DC, 0x88C1, 0x8F09, 0x969B, 0x5264, 0x5728,
+ 0x6750, 0x7F6A, 0x8CA1, 0x51B4, 0x5742, 0x962A, 0x583A, 0x698A,
+ 0x80B4, 0x54B2, 0x5D0E, 0x57FC, 0x7895, 0x9DFA, 0x4F5C, 0x524A,
+ 0x548B, 0x643E, 0x6628, 0x6714, 0x67F5, 0x7A84, 0x7B56, 0x7D22,
+ 0x932F, 0x685C, 0x9BAD, 0x7B39, 0x5319, 0x518A, 0x5237,
+};
+unsigned short euc_to_utf8_BB[] = {
+         0x5BDF, 0x62F6, 0x64AE, 0x64E6, 0x672D, 0x6BBA, 0x85A9,
+ 0x96D1, 0x7690, 0x9BD6, 0x634C, 0x9306, 0x9BAB, 0x76BF, 0x6652,
+ 0x4E09, 0x5098, 0x53C2, 0x5C71, 0x60E8, 0x6492, 0x6563, 0x685F,
+ 0x71E6, 0x73CA, 0x7523, 0x7B97, 0x7E82, 0x8695, 0x8B83, 0x8CDB,
+ 0x9178, 0x9910, 0x65AC, 0x66AB, 0x6B8B, 0x4ED5, 0x4ED4, 0x4F3A,
+ 0x4F7F, 0x523A, 0x53F8, 0x53F2, 0x55E3, 0x56DB, 0x58EB, 0x59CB,
+ 0x59C9, 0x59FF, 0x5B50, 0x5C4D, 0x5E02, 0x5E2B, 0x5FD7, 0x601D,
+ 0x6307, 0x652F, 0x5B5C, 0x65AF, 0x65BD, 0x65E8, 0x679D, 0x6B62,
+ 0x6B7B, 0x6C0F, 0x7345, 0x7949, 0x79C1, 0x7CF8, 0x7D19, 0x7D2B,
+ 0x80A2, 0x8102, 0x81F3, 0x8996, 0x8A5E, 0x8A69, 0x8A66, 0x8A8C,
+ 0x8AEE, 0x8CC7, 0x8CDC, 0x96CC, 0x98FC, 0x6B6F, 0x4E8B, 0x4F3C,
+ 0x4F8D, 0x5150, 0x5B57, 0x5BFA, 0x6148, 0x6301, 0x6642,
+};
+unsigned short euc_to_utf8_BC[] = {
+         0x6B21, 0x6ECB, 0x6CBB, 0x723E, 0x74BD, 0x75D4, 0x78C1,
+ 0x793A, 0x800C, 0x8033, 0x81EA, 0x8494, 0x8F9E, 0x6C50, 0x9E7F,
+ 0x5F0F, 0x8B58, 0x9D2B, 0x7AFA, 0x8EF8, 0x5B8D, 0x96EB, 0x4E03,
+ 0x53F1, 0x57F7, 0x5931, 0x5AC9, 0x5BA4, 0x6089, 0x6E7F, 0x6F06,
+ 0x75BE, 0x8CEA, 0x5B9F, 0x8500, 0x7BE0, 0x5072, 0x67F4, 0x829D,
+ 0x5C61, 0x854A, 0x7E1E, 0x820E, 0x5199, 0x5C04, 0x6368, 0x8D66,
+ 0x659C, 0x716E, 0x793E, 0x7D17, 0x8005, 0x8B1D, 0x8ECA, 0x906E,
+ 0x86C7, 0x90AA, 0x501F, 0x52FA, 0x5C3A, 0x6753, 0x707C, 0x7235,
+ 0x914C, 0x91C8, 0x932B, 0x82E5, 0x5BC2, 0x5F31, 0x60F9, 0x4E3B,
+ 0x53D6, 0x5B88, 0x624B, 0x6731, 0x6B8A, 0x72E9, 0x73E0, 0x7A2E,
+ 0x816B, 0x8DA3, 0x9152, 0x9996, 0x5112, 0x53D7, 0x546A, 0x5BFF,
+ 0x6388, 0x6A39, 0x7DAC, 0x9700, 0x56DA, 0x53CE, 0x5468,
+};
+unsigned short euc_to_utf8_BD[] = {
+         0x5B97, 0x5C31, 0x5DDE, 0x4FEE, 0x6101, 0x62FE, 0x6D32,
+ 0x79C0, 0x79CB, 0x7D42, 0x7E4D, 0x7FD2, 0x81ED, 0x821F, 0x8490,
+ 0x8846, 0x8972, 0x8B90, 0x8E74, 0x8F2F, 0x9031, 0x914B, 0x916C,
+ 0x96C6, 0x919C, 0x4EC0, 0x4F4F, 0x5145, 0x5341, 0x5F93, 0x620E,
+ 0x67D4, 0x6C41, 0x6E0B, 0x7363, 0x7E26, 0x91CD, 0x9283, 0x53D4,
+ 0x5919, 0x5BBF, 0x6DD1, 0x795D, 0x7E2E, 0x7C9B, 0x587E, 0x719F,
+ 0x51FA, 0x8853, 0x8FF0, 0x4FCA, 0x5CFB, 0x6625, 0x77AC, 0x7AE3,
+ 0x821C, 0x99FF, 0x51C6, 0x5FAA, 0x65EC, 0x696F, 0x6B89, 0x6DF3,
+ 0x6E96, 0x6F64, 0x76FE, 0x7D14, 0x5DE1, 0x9075, 0x9187, 0x9806,
+ 0x51E6, 0x521D, 0x6240, 0x6691, 0x66D9, 0x6E1A, 0x5EB6, 0x7DD2,
+ 0x7F72, 0x66F8, 0x85AF, 0x85F7, 0x8AF8, 0x52A9, 0x53D9, 0x5973,
+ 0x5E8F, 0x5F90, 0x6055, 0x92E4, 0x9664, 0x50B7, 0x511F,
+};
+unsigned short euc_to_utf8_BE[] = {
+         0x52DD, 0x5320, 0x5347, 0x53EC, 0x54E8, 0x5546, 0x5531,
+ 0x5617, 0x5968, 0x59BE, 0x5A3C, 0x5BB5, 0x5C06, 0x5C0F, 0x5C11,
+ 0x5C1A, 0x5E84, 0x5E8A, 0x5EE0, 0x5F70, 0x627F, 0x6284, 0x62DB,
+ 0x638C, 0x6377, 0x6607, 0x660C, 0x662D, 0x6676, 0x677E, 0x68A2,
+ 0x6A1F, 0x6A35, 0x6CBC, 0x6D88, 0x6E09, 0x6E58, 0x713C, 0x7126,
+ 0x7167, 0x75C7, 0x7701, 0x785D, 0x7901, 0x7965, 0x79F0, 0x7AE0,
+ 0x7B11, 0x7CA7, 0x7D39, 0x8096, 0x83D6, 0x848B, 0x8549, 0x885D,
+ 0x88F3, 0x8A1F, 0x8A3C, 0x8A54, 0x8A73, 0x8C61, 0x8CDE, 0x91A4,
+ 0x9266, 0x937E, 0x9418, 0x969C, 0x9798, 0x4E0A, 0x4E08, 0x4E1E,
+ 0x4E57, 0x5197, 0x5270, 0x57CE, 0x5834, 0x58CC, 0x5B22, 0x5E38,
+ 0x60C5, 0x64FE, 0x6761, 0x6756, 0x6D44, 0x72B6, 0x7573, 0x7A63,
+ 0x84B8, 0x8B72, 0x91B8, 0x9320, 0x5631, 0x57F4, 0x98FE,
+};
+unsigned short euc_to_utf8_BF[] = {
+         0x62ED, 0x690D, 0x6B96, 0x71ED, 0x7E54, 0x8077, 0x8272,
+ 0x89E6, 0x98DF, 0x8755, 0x8FB1, 0x5C3B, 0x4F38, 0x4FE1, 0x4FB5,
+ 0x5507, 0x5A20, 0x5BDD, 0x5BE9, 0x5FC3, 0x614E, 0x632F, 0x65B0,
+ 0x664B, 0x68EE, 0x699B, 0x6D78, 0x6DF1, 0x7533, 0x75B9, 0x771F,
+ 0x795E, 0x79E6, 0x7D33, 0x81E3, 0x82AF, 0x85AA, 0x89AA, 0x8A3A,
+ 0x8EAB, 0x8F9B, 0x9032, 0x91DD, 0x9707, 0x4EBA, 0x4EC1, 0x5203,
+ 0x5875, 0x58EC, 0x5C0B, 0x751A, 0x5C3D, 0x814E, 0x8A0A, 0x8FC5,
+ 0x9663, 0x976D, 0x7B25, 0x8ACF, 0x9808, 0x9162, 0x56F3, 0x53A8,
+ 0x9017, 0x5439, 0x5782, 0x5E25, 0x63A8, 0x6C34, 0x708A, 0x7761,
+ 0x7C8B, 0x7FE0, 0x8870, 0x9042, 0x9154, 0x9310, 0x9318, 0x968F,
+ 0x745E, 0x9AC4, 0x5D07, 0x5D69, 0x6570, 0x67A2, 0x8DA8, 0x96DB,
+ 0x636E, 0x6749, 0x6919, 0x83C5, 0x9817, 0x96C0, 0x88FE,
+};
+unsigned short euc_to_utf8_C0[] = {
+         0x6F84, 0x647A, 0x5BF8, 0x4E16, 0x702C, 0x755D, 0x662F,
+ 0x51C4, 0x5236, 0x52E2, 0x59D3, 0x5F81, 0x6027, 0x6210, 0x653F,
+ 0x6574, 0x661F, 0x6674, 0x68F2, 0x6816, 0x6B63, 0x6E05, 0x7272,
+ 0x751F, 0x76DB, 0x7CBE, 0x8056, 0x58F0, 0x88FD, 0x897F, 0x8AA0,
+ 0x8A93, 0x8ACB, 0x901D, 0x9192, 0x9752, 0x9759, 0x6589, 0x7A0E,
+ 0x8106, 0x96BB, 0x5E2D, 0x60DC, 0x621A, 0x65A5, 0x6614, 0x6790,
+ 0x77F3, 0x7A4D, 0x7C4D, 0x7E3E, 0x810A, 0x8CAC, 0x8D64, 0x8DE1,
+ 0x8E5F, 0x78A9, 0x5207, 0x62D9, 0x63A5, 0x6442, 0x6298, 0x8A2D,
+ 0x7A83, 0x7BC0, 0x8AAC, 0x96EA, 0x7D76, 0x820C, 0x8749, 0x4ED9,
+ 0x5148, 0x5343, 0x5360, 0x5BA3, 0x5C02, 0x5C16, 0x5DDD, 0x6226,
+ 0x6247, 0x64B0, 0x6813, 0x6834, 0x6CC9, 0x6D45, 0x6D17, 0x67D3,
+ 0x6F5C, 0x714E, 0x717D, 0x65CB, 0x7A7F, 0x7BAD, 0x7DDA,
+};
+unsigned short euc_to_utf8_C1[] = {
+         0x7E4A, 0x7FA8, 0x817A, 0x821B, 0x8239, 0x85A6, 0x8A6E,
+ 0x8CCE, 0x8DF5, 0x9078, 0x9077, 0x92AD, 0x9291, 0x9583, 0x9BAE,
+ 0x524D, 0x5584, 0x6F38, 0x7136, 0x5168, 0x7985, 0x7E55, 0x81B3,
+ 0x7CCE, 0x564C, 0x5851, 0x5CA8, 0x63AA, 0x66FE, 0x66FD, 0x695A,
+ 0x72D9, 0x758F, 0x758E, 0x790E, 0x7956, 0x79DF, 0x7C97, 0x7D20,
+ 0x7D44, 0x8607, 0x8A34, 0x963B, 0x9061, 0x9F20, 0x50E7, 0x5275,
+ 0x53CC, 0x53E2, 0x5009, 0x55AA, 0x58EE, 0x594F, 0x723D, 0x5B8B,
+ 0x5C64, 0x531D, 0x60E3, 0x60F3, 0x635C, 0x6383, 0x633F, 0x63BB,
+ 0x64CD, 0x65E9, 0x66F9, 0x5DE3, 0x69CD, 0x69FD, 0x6F15, 0x71E5,
+ 0x4E89, 0x75E9, 0x76F8, 0x7A93, 0x7CDF, 0x7DCF, 0x7D9C, 0x8061,
+ 0x8349, 0x8358, 0x846C, 0x84BC, 0x85FB, 0x88C5, 0x8D70, 0x9001,
+ 0x906D, 0x9397, 0x971C, 0x9A12, 0x50CF, 0x5897, 0x618E,
+};
+unsigned short euc_to_utf8_C2[] = {
+         0x81D3, 0x8535, 0x8D08, 0x9020, 0x4FC3, 0x5074, 0x5247,
+ 0x5373, 0x606F, 0x6349, 0x675F, 0x6E2C, 0x8DB3, 0x901F, 0x4FD7,
+ 0x5C5E, 0x8CCA, 0x65CF, 0x7D9A, 0x5352, 0x8896, 0x5176, 0x63C3,
+ 0x5B58, 0x5B6B, 0x5C0A, 0x640D, 0x6751, 0x905C, 0x4ED6, 0x591A,
+ 0x592A, 0x6C70, 0x8A51, 0x553E, 0x5815, 0x59A5, 0x60F0, 0x6253,
+ 0x67C1, 0x8235, 0x6955, 0x9640, 0x99C4, 0x9A28, 0x4F53, 0x5806,
+ 0x5BFE, 0x8010, 0x5CB1, 0x5E2F, 0x5F85, 0x6020, 0x614B, 0x6234,
+ 0x66FF, 0x6CF0, 0x6EDE, 0x80CE, 0x817F, 0x82D4, 0x888B, 0x8CB8,
+ 0x9000, 0x902E, 0x968A, 0x9EDB, 0x9BDB, 0x4EE3, 0x53F0, 0x5927,
+ 0x7B2C, 0x918D, 0x984C, 0x9DF9, 0x6EDD, 0x7027, 0x5353, 0x5544,
+ 0x5B85, 0x6258, 0x629E, 0x62D3, 0x6CA2, 0x6FEF, 0x7422, 0x8A17,
+ 0x9438, 0x6FC1, 0x8AFE, 0x8338, 0x51E7, 0x86F8, 0x53EA,
+};
+unsigned short euc_to_utf8_C3[] = {
+         0x53E9, 0x4F46, 0x9054, 0x8FB0, 0x596A, 0x8131, 0x5DFD,
+ 0x7AEA, 0x8FBF, 0x68DA, 0x8C37, 0x72F8, 0x9C48, 0x6A3D, 0x8AB0,
+ 0x4E39, 0x5358, 0x5606, 0x5766, 0x62C5, 0x63A2, 0x65E6, 0x6B4E,
+ 0x6DE1, 0x6E5B, 0x70AD, 0x77ED, 0x7AEF, 0x7BAA, 0x7DBB, 0x803D,
+ 0x80C6, 0x86CB, 0x8A95, 0x935B, 0x56E3, 0x58C7, 0x5F3E, 0x65AD,
+ 0x6696, 0x6A80, 0x6BB5, 0x7537, 0x8AC7, 0x5024, 0x77E5, 0x5730,
+ 0x5F1B, 0x6065, 0x667A, 0x6C60, 0x75F4, 0x7A1A, 0x7F6E, 0x81F4,
+ 0x8718, 0x9045, 0x99B3, 0x7BC9, 0x755C, 0x7AF9, 0x7B51, 0x84C4,
+ 0x9010, 0x79E9, 0x7A92, 0x8336, 0x5AE1, 0x7740, 0x4E2D, 0x4EF2,
+ 0x5B99, 0x5FE0, 0x62BD, 0x663C, 0x67F1, 0x6CE8, 0x866B, 0x8877,
+ 0x8A3B, 0x914E, 0x92F3, 0x99D0, 0x6A17, 0x7026, 0x732A, 0x82E7,
+ 0x8457, 0x8CAF, 0x4E01, 0x5146, 0x51CB, 0x558B, 0x5BF5,
+};
+unsigned short euc_to_utf8_C4[] = {
+         0x5E16, 0x5E33, 0x5E81, 0x5F14, 0x5F35, 0x5F6B, 0x5FB4,
+ 0x61F2, 0x6311, 0x66A2, 0x671D, 0x6F6E, 0x7252, 0x753A, 0x773A,
+ 0x8074, 0x8139, 0x8178, 0x8776, 0x8ABF, 0x8ADC, 0x8D85, 0x8DF3,
+ 0x929A, 0x9577, 0x9802, 0x9CE5, 0x52C5, 0x6357, 0x76F4, 0x6715,
+ 0x6C88, 0x73CD, 0x8CC3, 0x93AE, 0x9673, 0x6D25, 0x589C, 0x690E,
+ 0x69CC, 0x8FFD, 0x939A, 0x75DB, 0x901A, 0x585A, 0x6802, 0x63B4,
+ 0x69FB, 0x4F43, 0x6F2C, 0x67D8, 0x8FBB, 0x8526, 0x7DB4, 0x9354,
+ 0x693F, 0x6F70, 0x576A, 0x58F7, 0x5B2C, 0x7D2C, 0x722A, 0x540A,
+ 0x91E3, 0x9DB4, 0x4EAD, 0x4F4E, 0x505C, 0x5075, 0x5243, 0x8C9E,
+ 0x5448, 0x5824, 0x5B9A, 0x5E1D, 0x5E95, 0x5EAD, 0x5EF7, 0x5F1F,
+ 0x608C, 0x62B5, 0x633A, 0x63D0, 0x68AF, 0x6C40, 0x7887, 0x798E,
+ 0x7A0B, 0x7DE0, 0x8247, 0x8A02, 0x8AE6, 0x8E44, 0x9013,
+};
+unsigned short euc_to_utf8_C5[] = {
+         0x90B8, 0x912D, 0x91D8, 0x9F0E, 0x6CE5, 0x6458, 0x64E2,
+ 0x6575, 0x6EF4, 0x7684, 0x7B1B, 0x9069, 0x93D1, 0x6EBA, 0x54F2,
+ 0x5FB9, 0x64A4, 0x8F4D, 0x8FED, 0x9244, 0x5178, 0x586B, 0x5929,
+ 0x5C55, 0x5E97, 0x6DFB, 0x7E8F, 0x751C, 0x8CBC, 0x8EE2, 0x985B,
+ 0x70B9, 0x4F1D, 0x6BBF, 0x6FB1, 0x7530, 0x96FB, 0x514E, 0x5410,
+ 0x5835, 0x5857, 0x59AC, 0x5C60, 0x5F92, 0x6597, 0x675C, 0x6E21,
+ 0x767B, 0x83DF, 0x8CED, 0x9014, 0x90FD, 0x934D, 0x7825, 0x783A,
+ 0x52AA, 0x5EA6, 0x571F, 0x5974, 0x6012, 0x5012, 0x515A, 0x51AC,
+ 0x51CD, 0x5200, 0x5510, 0x5854, 0x5858, 0x5957, 0x5B95, 0x5CF6,
+ 0x5D8B, 0x60BC, 0x6295, 0x642D, 0x6771, 0x6843, 0x68BC, 0x68DF,
+ 0x76D7, 0x6DD8, 0x6E6F, 0x6D9B, 0x706F, 0x71C8, 0x5F53, 0x75D8,
+ 0x7977, 0x7B49, 0x7B54, 0x7B52, 0x7CD6, 0x7D71, 0x5230,
+};
+unsigned short euc_to_utf8_C6[] = {
+         0x8463, 0x8569, 0x85E4, 0x8A0E, 0x8B04, 0x8C46, 0x8E0F,
+ 0x9003, 0x900F, 0x9419, 0x9676, 0x982D, 0x9A30, 0x95D8, 0x50CD,
+ 0x52D5, 0x540C, 0x5802, 0x5C0E, 0x61A7, 0x649E, 0x6D1E, 0x77B3,
+ 0x7AE5, 0x80F4, 0x8404, 0x9053, 0x9285, 0x5CE0, 0x9D07, 0x533F,
+ 0x5F97, 0x5FB3, 0x6D9C, 0x7279, 0x7763, 0x79BF, 0x7BE4, 0x6BD2,
+ 0x72EC, 0x8AAD, 0x6803, 0x6A61, 0x51F8, 0x7A81, 0x6934, 0x5C4A,
+ 0x9CF6, 0x82EB, 0x5BC5, 0x9149, 0x701E, 0x5678, 0x5C6F, 0x60C7,
+ 0x6566, 0x6C8C, 0x8C5A, 0x9041, 0x9813, 0x5451, 0x66C7, 0x920D,
+ 0x5948, 0x90A3, 0x5185, 0x4E4D, 0x51EA, 0x8599, 0x8B0E, 0x7058,
+ 0x637A, 0x934B, 0x6962, 0x99B4, 0x7E04, 0x7577, 0x5357, 0x6960,
+ 0x8EDF, 0x96E3, 0x6C5D, 0x4E8C, 0x5C3C, 0x5F10, 0x8FE9, 0x5302,
+ 0x8CD1, 0x8089, 0x8679, 0x5EFF, 0x65E5, 0x4E73, 0x5165,
+};
+unsigned short euc_to_utf8_C7[] = {
+         0x5982, 0x5C3F, 0x97EE, 0x4EFB, 0x598A, 0x5FCD, 0x8A8D,
+ 0x6FE1, 0x79B0, 0x7962, 0x5BE7, 0x8471, 0x732B, 0x71B1, 0x5E74,
+ 0x5FF5, 0x637B, 0x649A, 0x71C3, 0x7C98, 0x4E43, 0x5EFC, 0x4E4B,
+ 0x57DC, 0x56A2, 0x60A9, 0x6FC3, 0x7D0D, 0x80FD, 0x8133, 0x81BF,
+ 0x8FB2, 0x8997, 0x86A4, 0x5DF4, 0x628A, 0x64AD, 0x8987, 0x6777,
+ 0x6CE2, 0x6D3E, 0x7436, 0x7834, 0x5A46, 0x7F75, 0x82AD, 0x99AC,
+ 0x4FF3, 0x5EC3, 0x62DD, 0x6392, 0x6557, 0x676F, 0x76C3, 0x724C,
+ 0x80CC, 0x80BA, 0x8F29, 0x914D, 0x500D, 0x57F9, 0x5A92, 0x6885,
+ 0x6973, 0x7164, 0x72FD, 0x8CB7, 0x58F2, 0x8CE0, 0x966A, 0x9019,
+ 0x877F, 0x79E4, 0x77E7, 0x8429, 0x4F2F, 0x5265, 0x535A, 0x62CD,
+ 0x67CF, 0x6CCA, 0x767D, 0x7B94, 0x7C95, 0x8236, 0x8584, 0x8FEB,
+ 0x66DD, 0x6F20, 0x7206, 0x7E1B, 0x83AB, 0x99C1, 0x9EA6,
+};
+unsigned short euc_to_utf8_C8[] = {
+         0x51FD, 0x7BB1, 0x7872, 0x7BB8, 0x8087, 0x7B48, 0x6AE8,
+ 0x5E61, 0x808C, 0x7551, 0x7560, 0x516B, 0x9262, 0x6E8C, 0x767A,
+ 0x9197, 0x9AEA, 0x4F10, 0x7F70, 0x629C, 0x7B4F, 0x95A5, 0x9CE9,
+ 0x567A, 0x5859, 0x86E4, 0x96BC, 0x4F34, 0x5224, 0x534A, 0x53CD,
+ 0x53DB, 0x5E06, 0x642C, 0x6591, 0x677F, 0x6C3E, 0x6C4E, 0x7248,
+ 0x72AF, 0x73ED, 0x7554, 0x7E41, 0x822C, 0x85E9, 0x8CA9, 0x7BC4,
+ 0x91C6, 0x7169, 0x9812, 0x98EF, 0x633D, 0x6669, 0x756A, 0x76E4,
+ 0x78D0, 0x8543, 0x86EE, 0x532A, 0x5351, 0x5426, 0x5983, 0x5E87,
+ 0x5F7C, 0x60B2, 0x6249, 0x6279, 0x62AB, 0x6590, 0x6BD4, 0x6CCC,
+ 0x75B2, 0x76AE, 0x7891, 0x79D8, 0x7DCB, 0x7F77, 0x80A5, 0x88AB,
+ 0x8AB9, 0x8CBB, 0x907F, 0x975E, 0x98DB, 0x6A0B, 0x7C38, 0x5099,
+ 0x5C3E, 0x5FAE, 0x6787, 0x6BD8, 0x7435, 0x7709, 0x7F8E,
+};
+unsigned short euc_to_utf8_C9[] = {
+         0x9F3B, 0x67CA, 0x7A17, 0x5339, 0x758B, 0x9AED, 0x5F66,
+ 0x819D, 0x83F1, 0x8098, 0x5F3C, 0x5FC5, 0x7562, 0x7B46, 0x903C,
+ 0x6867, 0x59EB, 0x5A9B, 0x7D10, 0x767E, 0x8B2C, 0x4FF5, 0x5F6A,
+ 0x6A19, 0x6C37, 0x6F02, 0x74E2, 0x7968, 0x8868, 0x8A55, 0x8C79,
+ 0x5EDF, 0x63CF, 0x75C5, 0x79D2, 0x82D7, 0x9328, 0x92F2, 0x849C,
+ 0x86ED, 0x9C2D, 0x54C1, 0x5F6C, 0x658C, 0x6D5C, 0x7015, 0x8CA7,
+ 0x8CD3, 0x983B, 0x654F, 0x74F6, 0x4E0D, 0x4ED8, 0x57E0, 0x592B,
+ 0x5A66, 0x5BCC, 0x51A8, 0x5E03, 0x5E9C, 0x6016, 0x6276, 0x6577,
+ 0x65A7, 0x666E, 0x6D6E, 0x7236, 0x7B26, 0x8150, 0x819A, 0x8299,
+ 0x8B5C, 0x8CA0, 0x8CE6, 0x8D74, 0x961C, 0x9644, 0x4FAE, 0x64AB,
+ 0x6B66, 0x821E, 0x8461, 0x856A, 0x90E8, 0x5C01, 0x6953, 0x98A8,
+ 0x847A, 0x8557, 0x4F0F, 0x526F, 0x5FA9, 0x5E45, 0x670D,
+};
+unsigned short euc_to_utf8_CA[] = {
+         0x798F, 0x8179, 0x8907, 0x8986, 0x6DF5, 0x5F17, 0x6255,
+ 0x6CB8, 0x4ECF, 0x7269, 0x9B92, 0x5206, 0x543B, 0x5674, 0x58B3,
+ 0x61A4, 0x626E, 0x711A, 0x596E, 0x7C89, 0x7CDE, 0x7D1B, 0x96F0,
+ 0x6587, 0x805E, 0x4E19, 0x4F75, 0x5175, 0x5840, 0x5E63, 0x5E73,
+ 0x5F0A, 0x67C4, 0x4E26, 0x853D, 0x9589, 0x965B, 0x7C73, 0x9801,
+ 0x50FB, 0x58C1, 0x7656, 0x78A7, 0x5225, 0x77A5, 0x8511, 0x7B86,
+ 0x504F, 0x5909, 0x7247, 0x7BC7, 0x7DE8, 0x8FBA, 0x8FD4, 0x904D,
+ 0x4FBF, 0x52C9, 0x5A29, 0x5F01, 0x97AD, 0x4FDD, 0x8217, 0x92EA,
+ 0x5703, 0x6355, 0x6B69, 0x752B, 0x88DC, 0x8F14, 0x7A42, 0x52DF,
+ 0x5893, 0x6155, 0x620A, 0x66AE, 0x6BCD, 0x7C3F, 0x83E9, 0x5023,
+ 0x4FF8, 0x5305, 0x5446, 0x5831, 0x5949, 0x5B9D, 0x5CF0, 0x5CEF,
+ 0x5D29, 0x5E96, 0x62B1, 0x6367, 0x653E, 0x65B9, 0x670B,
+};
+unsigned short euc_to_utf8_CB[] = {
+         0x6CD5, 0x6CE1, 0x70F9, 0x7832, 0x7E2B, 0x80DE, 0x82B3,
+ 0x840C, 0x84EC, 0x8702, 0x8912, 0x8A2A, 0x8C4A, 0x90A6, 0x92D2,
+ 0x98FD, 0x9CF3, 0x9D6C, 0x4E4F, 0x4EA1, 0x508D, 0x5256, 0x574A,
+ 0x59A8, 0x5E3D, 0x5FD8, 0x5FD9, 0x623F, 0x66B4, 0x671B, 0x67D0,
+ 0x68D2, 0x5192, 0x7D21, 0x80AA, 0x81A8, 0x8B00, 0x8C8C, 0x8CBF,
+ 0x927E, 0x9632, 0x5420, 0x982C, 0x5317, 0x50D5, 0x535C, 0x58A8,
+ 0x64B2, 0x6734, 0x7267, 0x7766, 0x7A46, 0x91E6, 0x52C3, 0x6CA1,
+ 0x6B86, 0x5800, 0x5E4C, 0x5954, 0x672C, 0x7FFB, 0x51E1, 0x76C6,
+ 0x6469, 0x78E8, 0x9B54, 0x9EBB, 0x57CB, 0x59B9, 0x6627, 0x679A,
+ 0x6BCE, 0x54E9, 0x69D9, 0x5E55, 0x819C, 0x6795, 0x9BAA, 0x67FE,
+ 0x9C52, 0x685D, 0x4EA6, 0x4FE3, 0x53C8, 0x62B9, 0x672B, 0x6CAB,
+ 0x8FC4, 0x4FAD, 0x7E6D, 0x9EBF, 0x4E07, 0x6162, 0x6E80,
+};
+unsigned short euc_to_utf8_CC[] = {
+         0x6F2B, 0x8513, 0x5473, 0x672A, 0x9B45, 0x5DF3, 0x7B95,
+ 0x5CAC, 0x5BC6, 0x871C, 0x6E4A, 0x84D1, 0x7A14, 0x8108, 0x5999,
+ 0x7C8D, 0x6C11, 0x7720, 0x52D9, 0x5922, 0x7121, 0x725F, 0x77DB,
+ 0x9727, 0x9D61, 0x690B, 0x5A7F, 0x5A18, 0x51A5, 0x540D, 0x547D,
+ 0x660E, 0x76DF, 0x8FF7, 0x9298, 0x9CF4, 0x59EA, 0x725D, 0x6EC5,
+ 0x514D, 0x68C9, 0x7DBF, 0x7DEC, 0x9762, 0x9EBA, 0x6478, 0x6A21,
+ 0x8302, 0x5984, 0x5B5F, 0x6BDB, 0x731B, 0x76F2, 0x7DB2, 0x8017,
+ 0x8499, 0x5132, 0x6728, 0x9ED9, 0x76EE, 0x6762, 0x52FF, 0x9905,
+ 0x5C24, 0x623B, 0x7C7E, 0x8CB0, 0x554F, 0x60B6, 0x7D0B, 0x9580,
+ 0x5301, 0x4E5F, 0x51B6, 0x591C, 0x723A, 0x8036, 0x91CE, 0x5F25,
+ 0x77E2, 0x5384, 0x5F79, 0x7D04, 0x85AC, 0x8A33, 0x8E8D, 0x9756,
+ 0x67F3, 0x85AE, 0x9453, 0x6109, 0x6108, 0x6CB9, 0x7652,
+};
+unsigned short euc_to_utf8_CD[] = {
+         0x8AED, 0x8F38, 0x552F, 0x4F51, 0x512A, 0x52C7, 0x53CB,
+ 0x5BA5, 0x5E7D, 0x60A0, 0x6182, 0x63D6, 0x6709, 0x67DA, 0x6E67,
+ 0x6D8C, 0x7336, 0x7337, 0x7531, 0x7950, 0x88D5, 0x8A98, 0x904A,
+ 0x9091, 0x90F5, 0x96C4, 0x878D, 0x5915, 0x4E88, 0x4F59, 0x4E0E,
+ 0x8A89, 0x8F3F, 0x9810, 0x50AD, 0x5E7C, 0x5996, 0x5BB9, 0x5EB8,
+ 0x63DA, 0x63FA, 0x64C1, 0x66DC, 0x694A, 0x69D8, 0x6D0B, 0x6EB6,
+ 0x7194, 0x7528, 0x7AAF, 0x7F8A, 0x8000, 0x8449, 0x84C9, 0x8981,
+ 0x8B21, 0x8E0A, 0x9065, 0x967D, 0x990A, 0x617E, 0x6291, 0x6B32,
+ 0x6C83, 0x6D74, 0x7FCC, 0x7FFC, 0x6DC0, 0x7F85, 0x87BA, 0x88F8,
+ 0x6765, 0x83B1, 0x983C, 0x96F7, 0x6D1B, 0x7D61, 0x843D, 0x916A,
+ 0x4E71, 0x5375, 0x5D50, 0x6B04, 0x6FEB, 0x85CD, 0x862D, 0x89A7,
+ 0x5229, 0x540F, 0x5C65, 0x674E, 0x68A8, 0x7406, 0x7483,
+};
+unsigned short euc_to_utf8_CE[] = {
+         0x75E2, 0x88CF, 0x88E1, 0x91CC, 0x96E2, 0x9678, 0x5F8B,
+ 0x7387, 0x7ACB, 0x844E, 0x63A0, 0x7565, 0x5289, 0x6D41, 0x6E9C,
+ 0x7409, 0x7559, 0x786B, 0x7C92, 0x9686, 0x7ADC, 0x9F8D, 0x4FB6,
+ 0x616E, 0x65C5, 0x865C, 0x4E86, 0x4EAE, 0x50DA, 0x4E21, 0x51CC,
+ 0x5BEE, 0x6599, 0x6881, 0x6DBC, 0x731F, 0x7642, 0x77AD, 0x7A1C,
+ 0x7CE7, 0x826F, 0x8AD2, 0x907C, 0x91CF, 0x9675, 0x9818, 0x529B,
+ 0x7DD1, 0x502B, 0x5398, 0x6797, 0x6DCB, 0x71D0, 0x7433, 0x81E8,
+ 0x8F2A, 0x96A3, 0x9C57, 0x9E9F, 0x7460, 0x5841, 0x6D99, 0x7D2F,
+ 0x985E, 0x4EE4, 0x4F36, 0x4F8B, 0x51B7, 0x52B1, 0x5DBA, 0x601C,
+ 0x73B2, 0x793C, 0x82D3, 0x9234, 0x96B7, 0x96F6, 0x970A, 0x9E97,
+ 0x9F62, 0x66A6, 0x6B74, 0x5217, 0x52A3, 0x70C8, 0x88C2, 0x5EC9,
+ 0x604B, 0x6190, 0x6F23, 0x7149, 0x7C3E, 0x7DF4, 0x806F,
+};
+unsigned short euc_to_utf8_CF[] = {
+         0x84EE, 0x9023, 0x932C, 0x5442, 0x9B6F, 0x6AD3, 0x7089,
+ 0x8CC2, 0x8DEF, 0x9732, 0x52B4, 0x5A41, 0x5ECA, 0x5F04, 0x6717,
+ 0x697C, 0x6994, 0x6D6A, 0x6F0F, 0x7262, 0x72FC, 0x7BED, 0x8001,
+ 0x807E, 0x874B, 0x90CE, 0x516D, 0x9E93, 0x7984, 0x808B, 0x9332,
+ 0x8AD6, 0x502D, 0x548C, 0x8A71, 0x6B6A, 0x8CC4, 0x8107, 0x60D1,
+ 0x67A0, 0x9DF2, 0x4E99, 0x4E98, 0x9C10, 0x8A6B, 0x85C1, 0x8568,
+ 0x6900, 0x6E7E, 0x7897, 0x8155,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short euc_to_utf8_D0[] = {
+         0x5F0C, 0x4E10, 0x4E15, 0x4E2A, 0x4E31, 0x4E36, 0x4E3C,
+ 0x4E3F, 0x4E42, 0x4E56, 0x4E58, 0x4E82, 0x4E85, 0x8C6B, 0x4E8A,
+ 0x8212, 0x5F0D, 0x4E8E, 0x4E9E, 0x4E9F, 0x4EA0, 0x4EA2, 0x4EB0,
+ 0x4EB3, 0x4EB6, 0x4ECE, 0x4ECD, 0x4EC4, 0x4EC6, 0x4EC2, 0x4ED7,
+ 0x4EDE, 0x4EED, 0x4EDF, 0x4EF7, 0x4F09, 0x4F5A, 0x4F30, 0x4F5B,
+ 0x4F5D, 0x4F57, 0x4F47, 0x4F76, 0x4F88, 0x4F8F, 0x4F98, 0x4F7B,
+ 0x4F69, 0x4F70, 0x4F91, 0x4F6F, 0x4F86, 0x4F96, 0x5118, 0x4FD4,
+ 0x4FDF, 0x4FCE, 0x4FD8, 0x4FDB, 0x4FD1, 0x4FDA, 0x4FD0, 0x4FE4,
+ 0x4FE5, 0x501A, 0x5028, 0x5014, 0x502A, 0x5025, 0x5005, 0x4F1C,
+ 0x4FF6, 0x5021, 0x5029, 0x502C, 0x4FFE, 0x4FEF, 0x5011, 0x5006,
+ 0x5043, 0x5047, 0x6703, 0x5055, 0x5050, 0x5048, 0x505A, 0x5056,
+ 0x506C, 0x5078, 0x5080, 0x509A, 0x5085, 0x50B4, 0x50B2,
+};
+unsigned short euc_to_utf8_D1[] = {
+         0x50C9, 0x50CA, 0x50B3, 0x50C2, 0x50D6, 0x50DE, 0x50E5,
+ 0x50ED, 0x50E3, 0x50EE, 0x50F9, 0x50F5, 0x5109, 0x5101, 0x5102,
+ 0x5116, 0x5115, 0x5114, 0x511A, 0x5121, 0x513A, 0x5137, 0x513C,
+ 0x513B, 0x513F, 0x5140, 0x5152, 0x514C, 0x5154, 0x5162, 0x7AF8,
+ 0x5169, 0x516A, 0x516E, 0x5180, 0x5182, 0x56D8, 0x518C, 0x5189,
+ 0x518F, 0x5191, 0x5193, 0x5195, 0x5196, 0x51A4, 0x51A6, 0x51A2,
+ 0x51A9, 0x51AA, 0x51AB, 0x51B3, 0x51B1, 0x51B2, 0x51B0, 0x51B5,
+ 0x51BD, 0x51C5, 0x51C9, 0x51DB, 0x51E0, 0x8655, 0x51E9, 0x51ED,
+ 0x51F0, 0x51F5, 0x51FE, 0x5204, 0x520B, 0x5214, 0x520E, 0x5227,
+ 0x522A, 0x522E, 0x5233, 0x5239, 0x524F, 0x5244, 0x524B, 0x524C,
+ 0x525E, 0x5254, 0x526A, 0x5274, 0x5269, 0x5273, 0x527F, 0x527D,
+ 0x528D, 0x5294, 0x5292, 0x5271, 0x5288, 0x5291, 0x8FA8,
+};
+unsigned short euc_to_utf8_D2[] = {
+         0x8FA7, 0x52AC, 0x52AD, 0x52BC, 0x52B5, 0x52C1, 0x52CD,
+ 0x52D7, 0x52DE, 0x52E3, 0x52E6, 0x98ED, 0x52E0, 0x52F3, 0x52F5,
+ 0x52F8, 0x52F9, 0x5306, 0x5308, 0x7538, 0x530D, 0x5310, 0x530F,
+ 0x5315, 0x531A, 0x5323, 0x532F, 0x5331, 0x5333, 0x5338, 0x5340,
+ 0x5346, 0x5345, 0x4E17, 0x5349, 0x534D, 0x51D6, 0x535E, 0x5369,
+ 0x536E, 0x5918, 0x537B, 0x5377, 0x5382, 0x5396, 0x53A0, 0x53A6,
+ 0x53A5, 0x53AE, 0x53B0, 0x53B6, 0x53C3, 0x7C12, 0x96D9, 0x53DF,
+ 0x66FC, 0x71EE, 0x53EE, 0x53E8, 0x53ED, 0x53FA, 0x5401, 0x543D,
+ 0x5440, 0x542C, 0x542D, 0x543C, 0x542E, 0x5436, 0x5429, 0x541D,
+ 0x544E, 0x548F, 0x5475, 0x548E, 0x545F, 0x5471, 0x5477, 0x5470,
+ 0x5492, 0x547B, 0x5480, 0x5476, 0x5484, 0x5490, 0x5486, 0x54C7,
+ 0x54A2, 0x54B8, 0x54A5, 0x54AC, 0x54C4, 0x54C8, 0x54A8,
+};
+unsigned short euc_to_utf8_D3[] = {
+         0x54AB, 0x54C2, 0x54A4, 0x54BE, 0x54BC, 0x54D8, 0x54E5,
+ 0x54E6, 0x550F, 0x5514, 0x54FD, 0x54EE, 0x54ED, 0x54FA, 0x54E2,
+ 0x5539, 0x5540, 0x5563, 0x554C, 0x552E, 0x555C, 0x5545, 0x5556,
+ 0x5557, 0x5538, 0x5533, 0x555D, 0x5599, 0x5580, 0x54AF, 0x558A,
+ 0x559F, 0x557B, 0x557E, 0x5598, 0x559E, 0x55AE, 0x557C, 0x5583,
+ 0x55A9, 0x5587, 0x55A8, 0x55DA, 0x55C5, 0x55DF, 0x55C4, 0x55DC,
+ 0x55E4, 0x55D4, 0x5614, 0x55F7, 0x5616, 0x55FE, 0x55FD, 0x561B,
+ 0x55F9, 0x564E, 0x5650, 0x71DF, 0x5634, 0x5636, 0x5632, 0x5638,
+ 0x566B, 0x5664, 0x562F, 0x566C, 0x566A, 0x5686, 0x5680, 0x568A,
+ 0x56A0, 0x5694, 0x568F, 0x56A5, 0x56AE, 0x56B6, 0x56B4, 0x56C2,
+ 0x56BC, 0x56C1, 0x56C3, 0x56C0, 0x56C8, 0x56CE, 0x56D1, 0x56D3,
+ 0x56D7, 0x56EE, 0x56F9, 0x5700, 0x56FF, 0x5704, 0x5709,
+};
+unsigned short euc_to_utf8_D4[] = {
+         0x5708, 0x570B, 0x570D, 0x5713, 0x5718, 0x5716, 0x55C7,
+ 0x571C, 0x5726, 0x5737, 0x5738, 0x574E, 0x573B, 0x5740, 0x574F,
+ 0x5769, 0x57C0, 0x5788, 0x5761, 0x577F, 0x5789, 0x5793, 0x57A0,
+ 0x57B3, 0x57A4, 0x57AA, 0x57B0, 0x57C3, 0x57C6, 0x57D4, 0x57D2,
+ 0x57D3, 0x580A, 0x57D6, 0x57E3, 0x580B, 0x5819, 0x581D, 0x5872,
+ 0x5821, 0x5862, 0x584B, 0x5870, 0x6BC0, 0x5852, 0x583D, 0x5879,
+ 0x5885, 0x58B9, 0x589F, 0x58AB, 0x58BA, 0x58DE, 0x58BB, 0x58B8,
+ 0x58AE, 0x58C5, 0x58D3, 0x58D1, 0x58D7, 0x58D9, 0x58D8, 0x58E5,
+ 0x58DC, 0x58E4, 0x58DF, 0x58EF, 0x58FA, 0x58F9, 0x58FB, 0x58FC,
+ 0x58FD, 0x5902, 0x590A, 0x5910, 0x591B, 0x68A6, 0x5925, 0x592C,
+ 0x592D, 0x5932, 0x5938, 0x593E, 0x7AD2, 0x5955, 0x5950, 0x594E,
+ 0x595A, 0x5958, 0x5962, 0x5960, 0x5967, 0x596C, 0x5969,
+};
+unsigned short euc_to_utf8_D5[] = {
+         0x5978, 0x5981, 0x599D, 0x4F5E, 0x4FAB, 0x59A3, 0x59B2,
+ 0x59C6, 0x59E8, 0x59DC, 0x598D, 0x59D9, 0x59DA, 0x5A25, 0x5A1F,
+ 0x5A11, 0x5A1C, 0x5A09, 0x5A1A, 0x5A40, 0x5A6C, 0x5A49, 0x5A35,
+ 0x5A36, 0x5A62, 0x5A6A, 0x5A9A, 0x5ABC, 0x5ABE, 0x5ACB, 0x5AC2,
+ 0x5ABD, 0x5AE3, 0x5AD7, 0x5AE6, 0x5AE9, 0x5AD6, 0x5AFA, 0x5AFB,
+ 0x5B0C, 0x5B0B, 0x5B16, 0x5B32, 0x5AD0, 0x5B2A, 0x5B36, 0x5B3E,
+ 0x5B43, 0x5B45, 0x5B40, 0x5B51, 0x5B55, 0x5B5A, 0x5B5B, 0x5B65,
+ 0x5B69, 0x5B70, 0x5B73, 0x5B75, 0x5B78, 0x6588, 0x5B7A, 0x5B80,
+ 0x5B83, 0x5BA6, 0x5BB8, 0x5BC3, 0x5BC7, 0x5BC9, 0x5BD4, 0x5BD0,
+ 0x5BE4, 0x5BE6, 0x5BE2, 0x5BDE, 0x5BE5, 0x5BEB, 0x5BF0, 0x5BF6,
+ 0x5BF3, 0x5C05, 0x5C07, 0x5C08, 0x5C0D, 0x5C13, 0x5C20, 0x5C22,
+ 0x5C28, 0x5C38, 0x5C39, 0x5C41, 0x5C46, 0x5C4E, 0x5C53,
+};
+unsigned short euc_to_utf8_D6[] = {
+         0x5C50, 0x5C4F, 0x5B71, 0x5C6C, 0x5C6E, 0x4E62, 0x5C76,
+ 0x5C79, 0x5C8C, 0x5C91, 0x5C94, 0x599B, 0x5CAB, 0x5CBB, 0x5CB6,
+ 0x5CBC, 0x5CB7, 0x5CC5, 0x5CBE, 0x5CC7, 0x5CD9, 0x5CE9, 0x5CFD,
+ 0x5CFA, 0x5CED, 0x5D8C, 0x5CEA, 0x5D0B, 0x5D15, 0x5D17, 0x5D5C,
+ 0x5D1F, 0x5D1B, 0x5D11, 0x5D14, 0x5D22, 0x5D1A, 0x5D19, 0x5D18,
+ 0x5D4C, 0x5D52, 0x5D4E, 0x5D4B, 0x5D6C, 0x5D73, 0x5D76, 0x5D87,
+ 0x5D84, 0x5D82, 0x5DA2, 0x5D9D, 0x5DAC, 0x5DAE, 0x5DBD, 0x5D90,
+ 0x5DB7, 0x5DBC, 0x5DC9, 0x5DCD, 0x5DD3, 0x5DD2, 0x5DD6, 0x5DDB,
+ 0x5DEB, 0x5DF2, 0x5DF5, 0x5E0B, 0x5E1A, 0x5E19, 0x5E11, 0x5E1B,
+ 0x5E36, 0x5E37, 0x5E44, 0x5E43, 0x5E40, 0x5E4E, 0x5E57, 0x5E54,
+ 0x5E5F, 0x5E62, 0x5E64, 0x5E47, 0x5E75, 0x5E76, 0x5E7A, 0x9EBC,
+ 0x5E7F, 0x5EA0, 0x5EC1, 0x5EC2, 0x5EC8, 0x5ED0, 0x5ECF,
+};
+unsigned short euc_to_utf8_D7[] = {
+         0x5ED6, 0x5EE3, 0x5EDD, 0x5EDA, 0x5EDB, 0x5EE2, 0x5EE1,
+ 0x5EE8, 0x5EE9, 0x5EEC, 0x5EF1, 0x5EF3, 0x5EF0, 0x5EF4, 0x5EF8,
+ 0x5EFE, 0x5F03, 0x5F09, 0x5F5D, 0x5F5C, 0x5F0B, 0x5F11, 0x5F16,
+ 0x5F29, 0x5F2D, 0x5F38, 0x5F41, 0x5F48, 0x5F4C, 0x5F4E, 0x5F2F,
+ 0x5F51, 0x5F56, 0x5F57, 0x5F59, 0x5F61, 0x5F6D, 0x5F73, 0x5F77,
+ 0x5F83, 0x5F82, 0x5F7F, 0x5F8A, 0x5F88, 0x5F91, 0x5F87, 0x5F9E,
+ 0x5F99, 0x5F98, 0x5FA0, 0x5FA8, 0x5FAD, 0x5FBC, 0x5FD6, 0x5FFB,
+ 0x5FE4, 0x5FF8, 0x5FF1, 0x5FDD, 0x60B3, 0x5FFF, 0x6021, 0x6060,
+ 0x6019, 0x6010, 0x6029, 0x600E, 0x6031, 0x601B, 0x6015, 0x602B,
+ 0x6026, 0x600F, 0x603A, 0x605A, 0x6041, 0x606A, 0x6077, 0x605F,
+ 0x604A, 0x6046, 0x604D, 0x6063, 0x6043, 0x6064, 0x6042, 0x606C,
+ 0x606B, 0x6059, 0x6081, 0x608D, 0x60E7, 0x6083, 0x609A,
+};
+unsigned short euc_to_utf8_D8[] = {
+         0x6084, 0x609B, 0x6096, 0x6097, 0x6092, 0x60A7, 0x608B,
+ 0x60E1, 0x60B8, 0x60E0, 0x60D3, 0x60B4, 0x5FF0, 0x60BD, 0x60C6,
+ 0x60B5, 0x60D8, 0x614D, 0x6115, 0x6106, 0x60F6, 0x60F7, 0x6100,
+ 0x60F4, 0x60FA, 0x6103, 0x6121, 0x60FB, 0x60F1, 0x610D, 0x610E,
+ 0x6147, 0x613E, 0x6128, 0x6127, 0x614A, 0x613F, 0x613C, 0x612C,
+ 0x6134, 0x613D, 0x6142, 0x6144, 0x6173, 0x6177, 0x6158, 0x6159,
+ 0x615A, 0x616B, 0x6174, 0x616F, 0x6165, 0x6171, 0x615F, 0x615D,
+ 0x6153, 0x6175, 0x6199, 0x6196, 0x6187, 0x61AC, 0x6194, 0x619A,
+ 0x618A, 0x6191, 0x61AB, 0x61AE, 0x61CC, 0x61CA, 0x61C9, 0x61F7,
+ 0x61C8, 0x61C3, 0x61C6, 0x61BA, 0x61CB, 0x7F79, 0x61CD, 0x61E6,
+ 0x61E3, 0x61F6, 0x61FA, 0x61F4, 0x61FF, 0x61FD, 0x61FC, 0x61FE,
+ 0x6200, 0x6208, 0x6209, 0x620D, 0x620C, 0x6214, 0x621B,
+};
+unsigned short euc_to_utf8_D9[] = {
+         0x621E, 0x6221, 0x622A, 0x622E, 0x6230, 0x6232, 0x6233,
+ 0x6241, 0x624E, 0x625E, 0x6263, 0x625B, 0x6260, 0x6268, 0x627C,
+ 0x6282, 0x6289, 0x627E, 0x6292, 0x6293, 0x6296, 0x62D4, 0x6283,
+ 0x6294, 0x62D7, 0x62D1, 0x62BB, 0x62CF, 0x62FF, 0x62C6, 0x64D4,
+ 0x62C8, 0x62DC, 0x62CC, 0x62CA, 0x62C2, 0x62C7, 0x629B, 0x62C9,
+ 0x630C, 0x62EE, 0x62F1, 0x6327, 0x6302, 0x6308, 0x62EF, 0x62F5,
+ 0x6350, 0x633E, 0x634D, 0x641C, 0x634F, 0x6396, 0x638E, 0x6380,
+ 0x63AB, 0x6376, 0x63A3, 0x638F, 0x6389, 0x639F, 0x63B5, 0x636B,
+ 0x6369, 0x63BE, 0x63E9, 0x63C0, 0x63C6, 0x63E3, 0x63C9, 0x63D2,
+ 0x63F6, 0x63C4, 0x6416, 0x6434, 0x6406, 0x6413, 0x6426, 0x6436,
+ 0x651D, 0x6417, 0x6428, 0x640F, 0x6467, 0x646F, 0x6476, 0x644E,
+ 0x652A, 0x6495, 0x6493, 0x64A5, 0x64A9, 0x6488, 0x64BC,
+};
+unsigned short euc_to_utf8_DA[] = {
+         0x64DA, 0x64D2, 0x64C5, 0x64C7, 0x64BB, 0x64D8, 0x64C2,
+ 0x64F1, 0x64E7, 0x8209, 0x64E0, 0x64E1, 0x62AC, 0x64E3, 0x64EF,
+ 0x652C, 0x64F6, 0x64F4, 0x64F2, 0x64FA, 0x6500, 0x64FD, 0x6518,
+ 0x651C, 0x6505, 0x6524, 0x6523, 0x652B, 0x6534, 0x6535, 0x6537,
+ 0x6536, 0x6538, 0x754B, 0x6548, 0x6556, 0x6555, 0x654D, 0x6558,
+ 0x655E, 0x655D, 0x6572, 0x6578, 0x6582, 0x6583, 0x8B8A, 0x659B,
+ 0x659F, 0x65AB, 0x65B7, 0x65C3, 0x65C6, 0x65C1, 0x65C4, 0x65CC,
+ 0x65D2, 0x65DB, 0x65D9, 0x65E0, 0x65E1, 0x65F1, 0x6772, 0x660A,
+ 0x6603, 0x65FB, 0x6773, 0x6635, 0x6636, 0x6634, 0x661C, 0x664F,
+ 0x6644, 0x6649, 0x6641, 0x665E, 0x665D, 0x6664, 0x6667, 0x6668,
+ 0x665F, 0x6662, 0x6670, 0x6683, 0x6688, 0x668E, 0x6689, 0x6684,
+ 0x6698, 0x669D, 0x66C1, 0x66B9, 0x66C9, 0x66BE, 0x66BC,
+};
+unsigned short euc_to_utf8_DB[] = {
+         0x66C4, 0x66B8, 0x66D6, 0x66DA, 0x66E0, 0x663F, 0x66E6,
+ 0x66E9, 0x66F0, 0x66F5, 0x66F7, 0x670F, 0x6716, 0x671E, 0x6726,
+ 0x6727, 0x9738, 0x672E, 0x673F, 0x6736, 0x6741, 0x6738, 0x6737,
+ 0x6746, 0x675E, 0x6760, 0x6759, 0x6763, 0x6764, 0x6789, 0x6770,
+ 0x67A9, 0x677C, 0x676A, 0x678C, 0x678B, 0x67A6, 0x67A1, 0x6785,
+ 0x67B7, 0x67EF, 0x67B4, 0x67EC, 0x67B3, 0x67E9, 0x67B8, 0x67E4,
+ 0x67DE, 0x67DD, 0x67E2, 0x67EE, 0x67B9, 0x67CE, 0x67C6, 0x67E7,
+ 0x6A9C, 0x681E, 0x6846, 0x6829, 0x6840, 0x684D, 0x6832, 0x684E,
+ 0x68B3, 0x682B, 0x6859, 0x6863, 0x6877, 0x687F, 0x689F, 0x688F,
+ 0x68AD, 0x6894, 0x689D, 0x689B, 0x6883, 0x6AAE, 0x68B9, 0x6874,
+ 0x68B5, 0x68A0, 0x68BA, 0x690F, 0x688D, 0x687E, 0x6901, 0x68CA,
+ 0x6908, 0x68D8, 0x6922, 0x6926, 0x68E1, 0x690C, 0x68CD,
+};
+unsigned short euc_to_utf8_DC[] = {
+         0x68D4, 0x68E7, 0x68D5, 0x6936, 0x6912, 0x6904, 0x68D7,
+ 0x68E3, 0x6925, 0x68F9, 0x68E0, 0x68EF, 0x6928, 0x692A, 0x691A,
+ 0x6923, 0x6921, 0x68C6, 0x6979, 0x6977, 0x695C, 0x6978, 0x696B,
+ 0x6954, 0x697E, 0x696E, 0x6939, 0x6974, 0x693D, 0x6959, 0x6930,
+ 0x6961, 0x695E, 0x695D, 0x6981, 0x696A, 0x69B2, 0x69AE, 0x69D0,
+ 0x69BF, 0x69C1, 0x69D3, 0x69BE, 0x69CE, 0x5BE8, 0x69CA, 0x69DD,
+ 0x69BB, 0x69C3, 0x69A7, 0x6A2E, 0x6991, 0x69A0, 0x699C, 0x6995,
+ 0x69B4, 0x69DE, 0x69E8, 0x6A02, 0x6A1B, 0x69FF, 0x6B0A, 0x69F9,
+ 0x69F2, 0x69E7, 0x6A05, 0x69B1, 0x6A1E, 0x69ED, 0x6A14, 0x69EB,
+ 0x6A0A, 0x6A12, 0x6AC1, 0x6A23, 0x6A13, 0x6A44, 0x6A0C, 0x6A72,
+ 0x6A36, 0x6A78, 0x6A47, 0x6A62, 0x6A59, 0x6A66, 0x6A48, 0x6A38,
+ 0x6A22, 0x6A90, 0x6A8D, 0x6AA0, 0x6A84, 0x6AA2, 0x6AA3,
+};
+unsigned short euc_to_utf8_DD[] = {
+         0x6A97, 0x8617, 0x6ABB, 0x6AC3, 0x6AC2, 0x6AB8, 0x6AB3,
+ 0x6AAC, 0x6ADE, 0x6AD1, 0x6ADF, 0x6AAA, 0x6ADA, 0x6AEA, 0x6AFB,
+ 0x6B05, 0x8616, 0x6AFA, 0x6B12, 0x6B16, 0x9B31, 0x6B1F, 0x6B38,
+ 0x6B37, 0x76DC, 0x6B39, 0x98EE, 0x6B47, 0x6B43, 0x6B49, 0x6B50,
+ 0x6B59, 0x6B54, 0x6B5B, 0x6B5F, 0x6B61, 0x6B78, 0x6B79, 0x6B7F,
+ 0x6B80, 0x6B84, 0x6B83, 0x6B8D, 0x6B98, 0x6B95, 0x6B9E, 0x6BA4,
+ 0x6BAA, 0x6BAB, 0x6BAF, 0x6BB2, 0x6BB1, 0x6BB3, 0x6BB7, 0x6BBC,
+ 0x6BC6, 0x6BCB, 0x6BD3, 0x6BDF, 0x6BEC, 0x6BEB, 0x6BF3, 0x6BEF,
+ 0x9EBE, 0x6C08, 0x6C13, 0x6C14, 0x6C1B, 0x6C24, 0x6C23, 0x6C5E,
+ 0x6C55, 0x6C62, 0x6C6A, 0x6C82, 0x6C8D, 0x6C9A, 0x6C81, 0x6C9B,
+ 0x6C7E, 0x6C68, 0x6C73, 0x6C92, 0x6C90, 0x6CC4, 0x6CF1, 0x6CD3,
+ 0x6CBD, 0x6CD7, 0x6CC5, 0x6CDD, 0x6CAE, 0x6CB1, 0x6CBE,
+};
+unsigned short euc_to_utf8_DE[] = {
+         0x6CBA, 0x6CDB, 0x6CEF, 0x6CD9, 0x6CEA, 0x6D1F, 0x884D,
+ 0x6D36, 0x6D2B, 0x6D3D, 0x6D38, 0x6D19, 0x6D35, 0x6D33, 0x6D12,
+ 0x6D0C, 0x6D63, 0x6D93, 0x6D64, 0x6D5A, 0x6D79, 0x6D59, 0x6D8E,
+ 0x6D95, 0x6FE4, 0x6D85, 0x6DF9, 0x6E15, 0x6E0A, 0x6DB5, 0x6DC7,
+ 0x6DE6, 0x6DB8, 0x6DC6, 0x6DEC, 0x6DDE, 0x6DCC, 0x6DE8, 0x6DD2,
+ 0x6DC5, 0x6DFA, 0x6DD9, 0x6DE4, 0x6DD5, 0x6DEA, 0x6DEE, 0x6E2D,
+ 0x6E6E, 0x6E2E, 0x6E19, 0x6E72, 0x6E5F, 0x6E3E, 0x6E23, 0x6E6B,
+ 0x6E2B, 0x6E76, 0x6E4D, 0x6E1F, 0x6E43, 0x6E3A, 0x6E4E, 0x6E24,
+ 0x6EFF, 0x6E1D, 0x6E38, 0x6E82, 0x6EAA, 0x6E98, 0x6EC9, 0x6EB7,
+ 0x6ED3, 0x6EBD, 0x6EAF, 0x6EC4, 0x6EB2, 0x6ED4, 0x6ED5, 0x6E8F,
+ 0x6EA5, 0x6EC2, 0x6E9F, 0x6F41, 0x6F11, 0x704C, 0x6EEC, 0x6EF8,
+ 0x6EFE, 0x6F3F, 0x6EF2, 0x6F31, 0x6EEF, 0x6F32, 0x6ECC,
+};
+unsigned short euc_to_utf8_DF[] = {
+         0x6F3E, 0x6F13, 0x6EF7, 0x6F86, 0x6F7A, 0x6F78, 0x6F81,
+ 0x6F80, 0x6F6F, 0x6F5B, 0x6FF3, 0x6F6D, 0x6F82, 0x6F7C, 0x6F58,
+ 0x6F8E, 0x6F91, 0x6FC2, 0x6F66, 0x6FB3, 0x6FA3, 0x6FA1, 0x6FA4,
+ 0x6FB9, 0x6FC6, 0x6FAA, 0x6FDF, 0x6FD5, 0x6FEC, 0x6FD4, 0x6FD8,
+ 0x6FF1, 0x6FEE, 0x6FDB, 0x7009, 0x700B, 0x6FFA, 0x7011, 0x7001,
+ 0x700F, 0x6FFE, 0x701B, 0x701A, 0x6F74, 0x701D, 0x7018, 0x701F,
+ 0x7030, 0x703E, 0x7032, 0x7051, 0x7063, 0x7099, 0x7092, 0x70AF,
+ 0x70F1, 0x70AC, 0x70B8, 0x70B3, 0x70AE, 0x70DF, 0x70CB, 0x70DD,
+ 0x70D9, 0x7109, 0x70FD, 0x711C, 0x7119, 0x7165, 0x7155, 0x7188,
+ 0x7166, 0x7162, 0x714C, 0x7156, 0x716C, 0x718F, 0x71FB, 0x7184,
+ 0x7195, 0x71A8, 0x71AC, 0x71D7, 0x71B9, 0x71BE, 0x71D2, 0x71C9,
+ 0x71D4, 0x71CE, 0x71E0, 0x71EC, 0x71E7, 0x71F5, 0x71FC,
+};
+unsigned short euc_to_utf8_E0[] = {
+         0x71F9, 0x71FF, 0x720D, 0x7210, 0x721B, 0x7228, 0x722D,
+ 0x722C, 0x7230, 0x7232, 0x723B, 0x723C, 0x723F, 0x7240, 0x7246,
+ 0x724B, 0x7258, 0x7274, 0x727E, 0x7282, 0x7281, 0x7287, 0x7292,
+ 0x7296, 0x72A2, 0x72A7, 0x72B9, 0x72B2, 0x72C3, 0x72C6, 0x72C4,
+ 0x72CE, 0x72D2, 0x72E2, 0x72E0, 0x72E1, 0x72F9, 0x72F7, 0x500F,
+ 0x7317, 0x730A, 0x731C, 0x7316, 0x731D, 0x7334, 0x732F, 0x7329,
+ 0x7325, 0x733E, 0x734E, 0x734F, 0x9ED8, 0x7357, 0x736A, 0x7368,
+ 0x7370, 0x7378, 0x7375, 0x737B, 0x737A, 0x73C8, 0x73B3, 0x73CE,
+ 0x73BB, 0x73C0, 0x73E5, 0x73EE, 0x73DE, 0x74A2, 0x7405, 0x746F,
+ 0x7425, 0x73F8, 0x7432, 0x743A, 0x7455, 0x743F, 0x745F, 0x7459,
+ 0x7441, 0x745C, 0x7469, 0x7470, 0x7463, 0x746A, 0x7476, 0x747E,
+ 0x748B, 0x749E, 0x74A7, 0x74CA, 0x74CF, 0x74D4, 0x73F1,
+};
+unsigned short euc_to_utf8_E1[] = {
+         0x74E0, 0x74E3, 0x74E7, 0x74E9, 0x74EE, 0x74F2, 0x74F0,
+ 0x74F1, 0x74F8, 0x74F7, 0x7504, 0x7503, 0x7505, 0x750C, 0x750E,
+ 0x750D, 0x7515, 0x7513, 0x751E, 0x7526, 0x752C, 0x753C, 0x7544,
+ 0x754D, 0x754A, 0x7549, 0x755B, 0x7546, 0x755A, 0x7569, 0x7564,
+ 0x7567, 0x756B, 0x756D, 0x7578, 0x7576, 0x7586, 0x7587, 0x7574,
+ 0x758A, 0x7589, 0x7582, 0x7594, 0x759A, 0x759D, 0x75A5, 0x75A3,
+ 0x75C2, 0x75B3, 0x75C3, 0x75B5, 0x75BD, 0x75B8, 0x75BC, 0x75B1,
+ 0x75CD, 0x75CA, 0x75D2, 0x75D9, 0x75E3, 0x75DE, 0x75FE, 0x75FF,
+ 0x75FC, 0x7601, 0x75F0, 0x75FA, 0x75F2, 0x75F3, 0x760B, 0x760D,
+ 0x7609, 0x761F, 0x7627, 0x7620, 0x7621, 0x7622, 0x7624, 0x7634,
+ 0x7630, 0x763B, 0x7647, 0x7648, 0x7646, 0x765C, 0x7658, 0x7661,
+ 0x7662, 0x7668, 0x7669, 0x766A, 0x7667, 0x766C, 0x7670,
+};
+unsigned short euc_to_utf8_E2[] = {
+         0x7672, 0x7676, 0x7678, 0x767C, 0x7680, 0x7683, 0x7688,
+ 0x768B, 0x768E, 0x7696, 0x7693, 0x7699, 0x769A, 0x76B0, 0x76B4,
+ 0x76B8, 0x76B9, 0x76BA, 0x76C2, 0x76CD, 0x76D6, 0x76D2, 0x76DE,
+ 0x76E1, 0x76E5, 0x76E7, 0x76EA, 0x862F, 0x76FB, 0x7708, 0x7707,
+ 0x7704, 0x7729, 0x7724, 0x771E, 0x7725, 0x7726, 0x771B, 0x7737,
+ 0x7738, 0x7747, 0x775A, 0x7768, 0x776B, 0x775B, 0x7765, 0x777F,
+ 0x777E, 0x7779, 0x778E, 0x778B, 0x7791, 0x77A0, 0x779E, 0x77B0,
+ 0x77B6, 0x77B9, 0x77BF, 0x77BC, 0x77BD, 0x77BB, 0x77C7, 0x77CD,
+ 0x77D7, 0x77DA, 0x77DC, 0x77E3, 0x77EE, 0x77FC, 0x780C, 0x7812,
+ 0x7926, 0x7820, 0x792A, 0x7845, 0x788E, 0x7874, 0x7886, 0x787C,
+ 0x789A, 0x788C, 0x78A3, 0x78B5, 0x78AA, 0x78AF, 0x78D1, 0x78C6,
+ 0x78CB, 0x78D4, 0x78BE, 0x78BC, 0x78C5, 0x78CA, 0x78EC,
+};
+unsigned short euc_to_utf8_E3[] = {
+         0x78E7, 0x78DA, 0x78FD, 0x78F4, 0x7907, 0x7912, 0x7911,
+ 0x7919, 0x792C, 0x792B, 0x7940, 0x7960, 0x7957, 0x795F, 0x795A,
+ 0x7955, 0x7953, 0x797A, 0x797F, 0x798A, 0x799D, 0x79A7, 0x9F4B,
+ 0x79AA, 0x79AE, 0x79B3, 0x79B9, 0x79BA, 0x79C9, 0x79D5, 0x79E7,
+ 0x79EC, 0x79E1, 0x79E3, 0x7A08, 0x7A0D, 0x7A18, 0x7A19, 0x7A20,
+ 0x7A1F, 0x7980, 0x7A31, 0x7A3B, 0x7A3E, 0x7A37, 0x7A43, 0x7A57,
+ 0x7A49, 0x7A61, 0x7A62, 0x7A69, 0x9F9D, 0x7A70, 0x7A79, 0x7A7D,
+ 0x7A88, 0x7A97, 0x7A95, 0x7A98, 0x7A96, 0x7AA9, 0x7AC8, 0x7AB0,
+ 0x7AB6, 0x7AC5, 0x7AC4, 0x7ABF, 0x9083, 0x7AC7, 0x7ACA, 0x7ACD,
+ 0x7ACF, 0x7AD5, 0x7AD3, 0x7AD9, 0x7ADA, 0x7ADD, 0x7AE1, 0x7AE2,
+ 0x7AE6, 0x7AED, 0x7AF0, 0x7B02, 0x7B0F, 0x7B0A, 0x7B06, 0x7B33,
+ 0x7B18, 0x7B19, 0x7B1E, 0x7B35, 0x7B28, 0x7B36, 0x7B50,
+};
+unsigned short euc_to_utf8_E4[] = {
+         0x7B7A, 0x7B04, 0x7B4D, 0x7B0B, 0x7B4C, 0x7B45, 0x7B75,
+ 0x7B65, 0x7B74, 0x7B67, 0x7B70, 0x7B71, 0x7B6C, 0x7B6E, 0x7B9D,
+ 0x7B98, 0x7B9F, 0x7B8D, 0x7B9C, 0x7B9A, 0x7B8B, 0x7B92, 0x7B8F,
+ 0x7B5D, 0x7B99, 0x7BCB, 0x7BC1, 0x7BCC, 0x7BCF, 0x7BB4, 0x7BC6,
+ 0x7BDD, 0x7BE9, 0x7C11, 0x7C14, 0x7BE6, 0x7BE5, 0x7C60, 0x7C00,
+ 0x7C07, 0x7C13, 0x7BF3, 0x7BF7, 0x7C17, 0x7C0D, 0x7BF6, 0x7C23,
+ 0x7C27, 0x7C2A, 0x7C1F, 0x7C37, 0x7C2B, 0x7C3D, 0x7C4C, 0x7C43,
+ 0x7C54, 0x7C4F, 0x7C40, 0x7C50, 0x7C58, 0x7C5F, 0x7C64, 0x7C56,
+ 0x7C65, 0x7C6C, 0x7C75, 0x7C83, 0x7C90, 0x7CA4, 0x7CAD, 0x7CA2,
+ 0x7CAB, 0x7CA1, 0x7CA8, 0x7CB3, 0x7CB2, 0x7CB1, 0x7CAE, 0x7CB9,
+ 0x7CBD, 0x7CC0, 0x7CC5, 0x7CC2, 0x7CD8, 0x7CD2, 0x7CDC, 0x7CE2,
+ 0x9B3B, 0x7CEF, 0x7CF2, 0x7CF4, 0x7CF6, 0x7CFA, 0x7D06,
+};
+unsigned short euc_to_utf8_E5[] = {
+         0x7D02, 0x7D1C, 0x7D15, 0x7D0A, 0x7D45, 0x7D4B, 0x7D2E,
+ 0x7D32, 0x7D3F, 0x7D35, 0x7D46, 0x7D73, 0x7D56, 0x7D4E, 0x7D72,
+ 0x7D68, 0x7D6E, 0x7D4F, 0x7D63, 0x7D93, 0x7D89, 0x7D5B, 0x7D8F,
+ 0x7D7D, 0x7D9B, 0x7DBA, 0x7DAE, 0x7DA3, 0x7DB5, 0x7DC7, 0x7DBD,
+ 0x7DAB, 0x7E3D, 0x7DA2, 0x7DAF, 0x7DDC, 0x7DB8, 0x7D9F, 0x7DB0,
+ 0x7DD8, 0x7DDD, 0x7DE4, 0x7DDE, 0x7DFB, 0x7DF2, 0x7DE1, 0x7E05,
+ 0x7E0A, 0x7E23, 0x7E21, 0x7E12, 0x7E31, 0x7E1F, 0x7E09, 0x7E0B,
+ 0x7E22, 0x7E46, 0x7E66, 0x7E3B, 0x7E35, 0x7E39, 0x7E43, 0x7E37,
+ 0x7E32, 0x7E3A, 0x7E67, 0x7E5D, 0x7E56, 0x7E5E, 0x7E59, 0x7E5A,
+ 0x7E79, 0x7E6A, 0x7E69, 0x7E7C, 0x7E7B, 0x7E83, 0x7DD5, 0x7E7D,
+ 0x8FAE, 0x7E7F, 0x7E88, 0x7E89, 0x7E8C, 0x7E92, 0x7E90, 0x7E93,
+ 0x7E94, 0x7E96, 0x7E8E, 0x7E9B, 0x7E9C, 0x7F38, 0x7F3A,
+};
+unsigned short euc_to_utf8_E6[] = {
+         0x7F45, 0x7F4C, 0x7F4D, 0x7F4E, 0x7F50, 0x7F51, 0x7F55,
+ 0x7F54, 0x7F58, 0x7F5F, 0x7F60, 0x7F68, 0x7F69, 0x7F67, 0x7F78,
+ 0x7F82, 0x7F86, 0x7F83, 0x7F88, 0x7F87, 0x7F8C, 0x7F94, 0x7F9E,
+ 0x7F9D, 0x7F9A, 0x7FA3, 0x7FAF, 0x7FB2, 0x7FB9, 0x7FAE, 0x7FB6,
+ 0x7FB8, 0x8B71, 0x7FC5, 0x7FC6, 0x7FCA, 0x7FD5, 0x7FD4, 0x7FE1,
+ 0x7FE6, 0x7FE9, 0x7FF3, 0x7FF9, 0x98DC, 0x8006, 0x8004, 0x800B,
+ 0x8012, 0x8018, 0x8019, 0x801C, 0x8021, 0x8028, 0x803F, 0x803B,
+ 0x804A, 0x8046, 0x8052, 0x8058, 0x805A, 0x805F, 0x8062, 0x8068,
+ 0x8073, 0x8072, 0x8070, 0x8076, 0x8079, 0x807D, 0x807F, 0x8084,
+ 0x8086, 0x8085, 0x809B, 0x8093, 0x809A, 0x80AD, 0x5190, 0x80AC,
+ 0x80DB, 0x80E5, 0x80D9, 0x80DD, 0x80C4, 0x80DA, 0x80D6, 0x8109,
+ 0x80EF, 0x80F1, 0x811B, 0x8129, 0x8123, 0x812F, 0x814B,
+};
+unsigned short euc_to_utf8_E7[] = {
+         0x968B, 0x8146, 0x813E, 0x8153, 0x8151, 0x80FC, 0x8171,
+ 0x816E, 0x8165, 0x8166, 0x8174, 0x8183, 0x8188, 0x818A, 0x8180,
+ 0x8182, 0x81A0, 0x8195, 0x81A4, 0x81A3, 0x815F, 0x8193, 0x81A9,
+ 0x81B0, 0x81B5, 0x81BE, 0x81B8, 0x81BD, 0x81C0, 0x81C2, 0x81BA,
+ 0x81C9, 0x81CD, 0x81D1, 0x81D9, 0x81D8, 0x81C8, 0x81DA, 0x81DF,
+ 0x81E0, 0x81E7, 0x81FA, 0x81FB, 0x81FE, 0x8201, 0x8202, 0x8205,
+ 0x8207, 0x820A, 0x820D, 0x8210, 0x8216, 0x8229, 0x822B, 0x8238,
+ 0x8233, 0x8240, 0x8259, 0x8258, 0x825D, 0x825A, 0x825F, 0x8264,
+ 0x8262, 0x8268, 0x826A, 0x826B, 0x822E, 0x8271, 0x8277, 0x8278,
+ 0x827E, 0x828D, 0x8292, 0x82AB, 0x829F, 0x82BB, 0x82AC, 0x82E1,
+ 0x82E3, 0x82DF, 0x82D2, 0x82F4, 0x82F3, 0x82FA, 0x8393, 0x8303,
+ 0x82FB, 0x82F9, 0x82DE, 0x8306, 0x82DC, 0x8309, 0x82D9,
+};
+unsigned short euc_to_utf8_E8[] = {
+         0x8335, 0x8334, 0x8316, 0x8332, 0x8331, 0x8340, 0x8339,
+ 0x8350, 0x8345, 0x832F, 0x832B, 0x8317, 0x8318, 0x8385, 0x839A,
+ 0x83AA, 0x839F, 0x83A2, 0x8396, 0x8323, 0x838E, 0x8387, 0x838A,
+ 0x837C, 0x83B5, 0x8373, 0x8375, 0x83A0, 0x8389, 0x83A8, 0x83F4,
+ 0x8413, 0x83EB, 0x83CE, 0x83FD, 0x8403, 0x83D8, 0x840B, 0x83C1,
+ 0x83F7, 0x8407, 0x83E0, 0x83F2, 0x840D, 0x8422, 0x8420, 0x83BD,
+ 0x8438, 0x8506, 0x83FB, 0x846D, 0x842A, 0x843C, 0x855A, 0x8484,
+ 0x8477, 0x846B, 0x84AD, 0x846E, 0x8482, 0x8469, 0x8446, 0x842C,
+ 0x846F, 0x8479, 0x8435, 0x84CA, 0x8462, 0x84B9, 0x84BF, 0x849F,
+ 0x84D9, 0x84CD, 0x84BB, 0x84DA, 0x84D0, 0x84C1, 0x84C6, 0x84D6,
+ 0x84A1, 0x8521, 0x84FF, 0x84F4, 0x8517, 0x8518, 0x852C, 0x851F,
+ 0x8515, 0x8514, 0x84FC, 0x8540, 0x8563, 0x8558, 0x8548,
+};
+unsigned short euc_to_utf8_E9[] = {
+         0x8541, 0x8602, 0x854B, 0x8555, 0x8580, 0x85A4, 0x8588,
+ 0x8591, 0x858A, 0x85A8, 0x856D, 0x8594, 0x859B, 0x85EA, 0x8587,
+ 0x859C, 0x8577, 0x857E, 0x8590, 0x85C9, 0x85BA, 0x85CF, 0x85B9,
+ 0x85D0, 0x85D5, 0x85DD, 0x85E5, 0x85DC, 0x85F9, 0x860A, 0x8613,
+ 0x860B, 0x85FE, 0x85FA, 0x8606, 0x8622, 0x861A, 0x8630, 0x863F,
+ 0x864D, 0x4E55, 0x8654, 0x865F, 0x8667, 0x8671, 0x8693, 0x86A3,
+ 0x86A9, 0x86AA, 0x868B, 0x868C, 0x86B6, 0x86AF, 0x86C4, 0x86C6,
+ 0x86B0, 0x86C9, 0x8823, 0x86AB, 0x86D4, 0x86DE, 0x86E9, 0x86EC,
+ 0x86DF, 0x86DB, 0x86EF, 0x8712, 0x8706, 0x8708, 0x8700, 0x8703,
+ 0x86FB, 0x8711, 0x8709, 0x870D, 0x86F9, 0x870A, 0x8734, 0x873F,
+ 0x8737, 0x873B, 0x8725, 0x8729, 0x871A, 0x8760, 0x875F, 0x8778,
+ 0x874C, 0x874E, 0x8774, 0x8757, 0x8768, 0x876E, 0x8759,
+};
+unsigned short euc_to_utf8_EA[] = {
+         0x8753, 0x8763, 0x876A, 0x8805, 0x87A2, 0x879F, 0x8782,
+ 0x87AF, 0x87CB, 0x87BD, 0x87C0, 0x87D0, 0x96D6, 0x87AB, 0x87C4,
+ 0x87B3, 0x87C7, 0x87C6, 0x87BB, 0x87EF, 0x87F2, 0x87E0, 0x880F,
+ 0x880D, 0x87FE, 0x87F6, 0x87F7, 0x880E, 0x87D2, 0x8811, 0x8816,
+ 0x8815, 0x8822, 0x8821, 0x8831, 0x8836, 0x8839, 0x8827, 0x883B,
+ 0x8844, 0x8842, 0x8852, 0x8859, 0x885E, 0x8862, 0x886B, 0x8881,
+ 0x887E, 0x889E, 0x8875, 0x887D, 0x88B5, 0x8872, 0x8882, 0x8897,
+ 0x8892, 0x88AE, 0x8899, 0x88A2, 0x888D, 0x88A4, 0x88B0, 0x88BF,
+ 0x88B1, 0x88C3, 0x88C4, 0x88D4, 0x88D8, 0x88D9, 0x88DD, 0x88F9,
+ 0x8902, 0x88FC, 0x88F4, 0x88E8, 0x88F2, 0x8904, 0x890C, 0x890A,
+ 0x8913, 0x8943, 0x891E, 0x8925, 0x892A, 0x892B, 0x8941, 0x8944,
+ 0x893B, 0x8936, 0x8938, 0x894C, 0x891D, 0x8960, 0x895E,
+};
+unsigned short euc_to_utf8_EB[] = {
+         0x8966, 0x8964, 0x896D, 0x896A, 0x896F, 0x8974, 0x8977,
+ 0x897E, 0x8983, 0x8988, 0x898A, 0x8993, 0x8998, 0x89A1, 0x89A9,
+ 0x89A6, 0x89AC, 0x89AF, 0x89B2, 0x89BA, 0x89BD, 0x89BF, 0x89C0,
+ 0x89DA, 0x89DC, 0x89DD, 0x89E7, 0x89F4, 0x89F8, 0x8A03, 0x8A16,
+ 0x8A10, 0x8A0C, 0x8A1B, 0x8A1D, 0x8A25, 0x8A36, 0x8A41, 0x8A5B,
+ 0x8A52, 0x8A46, 0x8A48, 0x8A7C, 0x8A6D, 0x8A6C, 0x8A62, 0x8A85,
+ 0x8A82, 0x8A84, 0x8AA8, 0x8AA1, 0x8A91, 0x8AA5, 0x8AA6, 0x8A9A,
+ 0x8AA3, 0x8AC4, 0x8ACD, 0x8AC2, 0x8ADA, 0x8AEB, 0x8AF3, 0x8AE7,
+ 0x8AE4, 0x8AF1, 0x8B14, 0x8AE0, 0x8AE2, 0x8AF7, 0x8ADE, 0x8ADB,
+ 0x8B0C, 0x8B07, 0x8B1A, 0x8AE1, 0x8B16, 0x8B10, 0x8B17, 0x8B20,
+ 0x8B33, 0x97AB, 0x8B26, 0x8B2B, 0x8B3E, 0x8B28, 0x8B41, 0x8B4C,
+ 0x8B4F, 0x8B4E, 0x8B49, 0x8B56, 0x8B5B, 0x8B5A, 0x8B6B,
+};
+unsigned short euc_to_utf8_EC[] = {
+         0x8B5F, 0x8B6C, 0x8B6F, 0x8B74, 0x8B7D, 0x8B80, 0x8B8C,
+ 0x8B8E, 0x8B92, 0x8B93, 0x8B96, 0x8B99, 0x8B9A, 0x8C3A, 0x8C41,
+ 0x8C3F, 0x8C48, 0x8C4C, 0x8C4E, 0x8C50, 0x8C55, 0x8C62, 0x8C6C,
+ 0x8C78, 0x8C7A, 0x8C82, 0x8C89, 0x8C85, 0x8C8A, 0x8C8D, 0x8C8E,
+ 0x8C94, 0x8C7C, 0x8C98, 0x621D, 0x8CAD, 0x8CAA, 0x8CBD, 0x8CB2,
+ 0x8CB3, 0x8CAE, 0x8CB6, 0x8CC8, 0x8CC1, 0x8CE4, 0x8CE3, 0x8CDA,
+ 0x8CFD, 0x8CFA, 0x8CFB, 0x8D04, 0x8D05, 0x8D0A, 0x8D07, 0x8D0F,
+ 0x8D0D, 0x8D10, 0x9F4E, 0x8D13, 0x8CCD, 0x8D14, 0x8D16, 0x8D67,
+ 0x8D6D, 0x8D71, 0x8D73, 0x8D81, 0x8D99, 0x8DC2, 0x8DBE, 0x8DBA,
+ 0x8DCF, 0x8DDA, 0x8DD6, 0x8DCC, 0x8DDB, 0x8DCB, 0x8DEA, 0x8DEB,
+ 0x8DDF, 0x8DE3, 0x8DFC, 0x8E08, 0x8E09, 0x8DFF, 0x8E1D, 0x8E1E,
+ 0x8E10, 0x8E1F, 0x8E42, 0x8E35, 0x8E30, 0x8E34, 0x8E4A,
+};
+unsigned short euc_to_utf8_ED[] = {
+         0x8E47, 0x8E49, 0x8E4C, 0x8E50, 0x8E48, 0x8E59, 0x8E64,
+ 0x8E60, 0x8E2A, 0x8E63, 0x8E55, 0x8E76, 0x8E72, 0x8E7C, 0x8E81,
+ 0x8E87, 0x8E85, 0x8E84, 0x8E8B, 0x8E8A, 0x8E93, 0x8E91, 0x8E94,
+ 0x8E99, 0x8EAA, 0x8EA1, 0x8EAC, 0x8EB0, 0x8EC6, 0x8EB1, 0x8EBE,
+ 0x8EC5, 0x8EC8, 0x8ECB, 0x8EDB, 0x8EE3, 0x8EFC, 0x8EFB, 0x8EEB,
+ 0x8EFE, 0x8F0A, 0x8F05, 0x8F15, 0x8F12, 0x8F19, 0x8F13, 0x8F1C,
+ 0x8F1F, 0x8F1B, 0x8F0C, 0x8F26, 0x8F33, 0x8F3B, 0x8F39, 0x8F45,
+ 0x8F42, 0x8F3E, 0x8F4C, 0x8F49, 0x8F46, 0x8F4E, 0x8F57, 0x8F5C,
+ 0x8F62, 0x8F63, 0x8F64, 0x8F9C, 0x8F9F, 0x8FA3, 0x8FAD, 0x8FAF,
+ 0x8FB7, 0x8FDA, 0x8FE5, 0x8FE2, 0x8FEA, 0x8FEF, 0x9087, 0x8FF4,
+ 0x9005, 0x8FF9, 0x8FFA, 0x9011, 0x9015, 0x9021, 0x900D, 0x901E,
+ 0x9016, 0x900B, 0x9027, 0x9036, 0x9035, 0x9039, 0x8FF8,
+};
+unsigned short euc_to_utf8_EE[] = {
+         0x904F, 0x9050, 0x9051, 0x9052, 0x900E, 0x9049, 0x903E,
+ 0x9056, 0x9058, 0x905E, 0x9068, 0x906F, 0x9076, 0x96A8, 0x9072,
+ 0x9082, 0x907D, 0x9081, 0x9080, 0x908A, 0x9089, 0x908F, 0x90A8,
+ 0x90AF, 0x90B1, 0x90B5, 0x90E2, 0x90E4, 0x6248, 0x90DB, 0x9102,
+ 0x9112, 0x9119, 0x9132, 0x9130, 0x914A, 0x9156, 0x9158, 0x9163,
+ 0x9165, 0x9169, 0x9173, 0x9172, 0x918B, 0x9189, 0x9182, 0x91A2,
+ 0x91AB, 0x91AF, 0x91AA, 0x91B5, 0x91B4, 0x91BA, 0x91C0, 0x91C1,
+ 0x91C9, 0x91CB, 0x91D0, 0x91D6, 0x91DF, 0x91E1, 0x91DB, 0x91FC,
+ 0x91F5, 0x91F6, 0x921E, 0x91FF, 0x9214, 0x922C, 0x9215, 0x9211,
+ 0x925E, 0x9257, 0x9245, 0x9249, 0x9264, 0x9248, 0x9295, 0x923F,
+ 0x924B, 0x9250, 0x929C, 0x9296, 0x9293, 0x929B, 0x925A, 0x92CF,
+ 0x92B9, 0x92B7, 0x92E9, 0x930F, 0x92FA, 0x9344, 0x932E,
+};
+unsigned short euc_to_utf8_EF[] = {
+         0x9319, 0x9322, 0x931A, 0x9323, 0x933A, 0x9335, 0x933B,
+ 0x935C, 0x9360, 0x937C, 0x936E, 0x9356, 0x93B0, 0x93AC, 0x93AD,
+ 0x9394, 0x93B9, 0x93D6, 0x93D7, 0x93E8, 0x93E5, 0x93D8, 0x93C3,
+ 0x93DD, 0x93D0, 0x93C8, 0x93E4, 0x941A, 0x9414, 0x9413, 0x9403,
+ 0x9407, 0x9410, 0x9436, 0x942B, 0x9435, 0x9421, 0x943A, 0x9441,
+ 0x9452, 0x9444, 0x945B, 0x9460, 0x9462, 0x945E, 0x946A, 0x9229,
+ 0x9470, 0x9475, 0x9477, 0x947D, 0x945A, 0x947C, 0x947E, 0x9481,
+ 0x947F, 0x9582, 0x9587, 0x958A, 0x9594, 0x9596, 0x9598, 0x9599,
+ 0x95A0, 0x95A8, 0x95A7, 0x95AD, 0x95BC, 0x95BB, 0x95B9, 0x95BE,
+ 0x95CA, 0x6FF6, 0x95C3, 0x95CD, 0x95CC, 0x95D5, 0x95D4, 0x95D6,
+ 0x95DC, 0x95E1, 0x95E5, 0x95E2, 0x9621, 0x9628, 0x962E, 0x962F,
+ 0x9642, 0x964C, 0x964F, 0x964B, 0x9677, 0x965C, 0x965E,
+};
+unsigned short euc_to_utf8_F0[] = {
+         0x965D, 0x965F, 0x9666, 0x9672, 0x966C, 0x968D, 0x9698,
+ 0x9695, 0x9697, 0x96AA, 0x96A7, 0x96B1, 0x96B2, 0x96B0, 0x96B4,
+ 0x96B6, 0x96B8, 0x96B9, 0x96CE, 0x96CB, 0x96C9, 0x96CD, 0x894D,
+ 0x96DC, 0x970D, 0x96D5, 0x96F9, 0x9704, 0x9706, 0x9708, 0x9713,
+ 0x970E, 0x9711, 0x970F, 0x9716, 0x9719, 0x9724, 0x972A, 0x9730,
+ 0x9739, 0x973D, 0x973E, 0x9744, 0x9746, 0x9748, 0x9742, 0x9749,
+ 0x975C, 0x9760, 0x9764, 0x9766, 0x9768, 0x52D2, 0x976B, 0x9771,
+ 0x9779, 0x9785, 0x977C, 0x9781, 0x977A, 0x9786, 0x978B, 0x978F,
+ 0x9790, 0x979C, 0x97A8, 0x97A6, 0x97A3, 0x97B3, 0x97B4, 0x97C3,
+ 0x97C6, 0x97C8, 0x97CB, 0x97DC, 0x97ED, 0x9F4F, 0x97F2, 0x7ADF,
+ 0x97F6, 0x97F5, 0x980F, 0x980C, 0x9838, 0x9824, 0x9821, 0x9837,
+ 0x983D, 0x9846, 0x984F, 0x984B, 0x986B, 0x986F, 0x9870,
+};
+unsigned short euc_to_utf8_F1[] = {
+         0x9871, 0x9874, 0x9873, 0x98AA, 0x98AF, 0x98B1, 0x98B6,
+ 0x98C4, 0x98C3, 0x98C6, 0x98E9, 0x98EB, 0x9903, 0x9909, 0x9912,
+ 0x9914, 0x9918, 0x9921, 0x991D, 0x991E, 0x9924, 0x9920, 0x992C,
+ 0x992E, 0x993D, 0x993E, 0x9942, 0x9949, 0x9945, 0x9950, 0x994B,
+ 0x9951, 0x9952, 0x994C, 0x9955, 0x9997, 0x9998, 0x99A5, 0x99AD,
+ 0x99AE, 0x99BC, 0x99DF, 0x99DB, 0x99DD, 0x99D8, 0x99D1, 0x99ED,
+ 0x99EE, 0x99F1, 0x99F2, 0x99FB, 0x99F8, 0x9A01, 0x9A0F, 0x9A05,
+ 0x99E2, 0x9A19, 0x9A2B, 0x9A37, 0x9A45, 0x9A42, 0x9A40, 0x9A43,
+ 0x9A3E, 0x9A55, 0x9A4D, 0x9A5B, 0x9A57, 0x9A5F, 0x9A62, 0x9A65,
+ 0x9A64, 0x9A69, 0x9A6B, 0x9A6A, 0x9AAD, 0x9AB0, 0x9ABC, 0x9AC0,
+ 0x9ACF, 0x9AD1, 0x9AD3, 0x9AD4, 0x9ADE, 0x9ADF, 0x9AE2, 0x9AE3,
+ 0x9AE6, 0x9AEF, 0x9AEB, 0x9AEE, 0x9AF4, 0x9AF1, 0x9AF7,
+};
+unsigned short euc_to_utf8_F2[] = {
+         0x9AFB, 0x9B06, 0x9B18, 0x9B1A, 0x9B1F, 0x9B22, 0x9B23,
+ 0x9B25, 0x9B27, 0x9B28, 0x9B29, 0x9B2A, 0x9B2E, 0x9B2F, 0x9B32,
+ 0x9B44, 0x9B43, 0x9B4F, 0x9B4D, 0x9B4E, 0x9B51, 0x9B58, 0x9B74,
+ 0x9B93, 0x9B83, 0x9B91, 0x9B96, 0x9B97, 0x9B9F, 0x9BA0, 0x9BA8,
+ 0x9BB4, 0x9BC0, 0x9BCA, 0x9BB9, 0x9BC6, 0x9BCF, 0x9BD1, 0x9BD2,
+ 0x9BE3, 0x9BE2, 0x9BE4, 0x9BD4, 0x9BE1, 0x9C3A, 0x9BF2, 0x9BF1,
+ 0x9BF0, 0x9C15, 0x9C14, 0x9C09, 0x9C13, 0x9C0C, 0x9C06, 0x9C08,
+ 0x9C12, 0x9C0A, 0x9C04, 0x9C2E, 0x9C1B, 0x9C25, 0x9C24, 0x9C21,
+ 0x9C30, 0x9C47, 0x9C32, 0x9C46, 0x9C3E, 0x9C5A, 0x9C60, 0x9C67,
+ 0x9C76, 0x9C78, 0x9CE7, 0x9CEC, 0x9CF0, 0x9D09, 0x9D08, 0x9CEB,
+ 0x9D03, 0x9D06, 0x9D2A, 0x9D26, 0x9DAF, 0x9D23, 0x9D1F, 0x9D44,
+ 0x9D15, 0x9D12, 0x9D41, 0x9D3F, 0x9D3E, 0x9D46, 0x9D48,
+};
+unsigned short euc_to_utf8_F3[] = {
+         0x9D5D, 0x9D5E, 0x9D64, 0x9D51, 0x9D50, 0x9D59, 0x9D72,
+ 0x9D89, 0x9D87, 0x9DAB, 0x9D6F, 0x9D7A, 0x9D9A, 0x9DA4, 0x9DA9,
+ 0x9DB2, 0x9DC4, 0x9DC1, 0x9DBB, 0x9DB8, 0x9DBA, 0x9DC6, 0x9DCF,
+ 0x9DC2, 0x9DD9, 0x9DD3, 0x9DF8, 0x9DE6, 0x9DED, 0x9DEF, 0x9DFD,
+ 0x9E1A, 0x9E1B, 0x9E1E, 0x9E75, 0x9E79, 0x9E7D, 0x9E81, 0x9E88,
+ 0x9E8B, 0x9E8C, 0x9E92, 0x9E95, 0x9E91, 0x9E9D, 0x9EA5, 0x9EA9,
+ 0x9EB8, 0x9EAA, 0x9EAD, 0x9761, 0x9ECC, 0x9ECE, 0x9ECF, 0x9ED0,
+ 0x9ED4, 0x9EDC, 0x9EDE, 0x9EDD, 0x9EE0, 0x9EE5, 0x9EE8, 0x9EEF,
+ 0x9EF4, 0x9EF6, 0x9EF7, 0x9EF9, 0x9EFB, 0x9EFC, 0x9EFD, 0x9F07,
+ 0x9F08, 0x76B7, 0x9F15, 0x9F21, 0x9F2C, 0x9F3E, 0x9F4A, 0x9F52,
+ 0x9F54, 0x9F63, 0x9F5F, 0x9F60, 0x9F61, 0x9F66, 0x9F67, 0x9F6C,
+ 0x9F6A, 0x9F77, 0x9F72, 0x9F76, 0x9F95, 0x9F9C, 0x9FA0,
+};
+unsigned short euc_to_utf8_F4[] = {
+         0x582F, 0x69C7, 0x9059, 0x7464, 0x51DC, 0x7199,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short euc_to_utf8_1byte[] = {
+         0xFF61, 0xFF62, 0xFF63, 0xFF64, 0xFF65, 0xFF66, 0xFF67,
+ 0xFF68, 0xFF69, 0xFF6A, 0xFF6B, 0xFF6C, 0xFF6D, 0xFF6E, 0xFF6F,
+ 0xFF70, 0xFF71, 0xFF72, 0xFF73, 0xFF74, 0xFF75, 0xFF76, 0xFF77,
+ 0xFF78, 0xFF79, 0xFF7A, 0xFF7B, 0xFF7C, 0xFF7D, 0xFF7E, 0xFF7F,
+ 0xFF80, 0xFF81, 0xFF82, 0xFF83, 0xFF84, 0xFF85, 0xFF86, 0xFF87,
+ 0xFF88, 0xFF89, 0xFF8A, 0xFF8B, 0xFF8C, 0xFF8D, 0xFF8E, 0xFF8F,
+ 0xFF90, 0xFF91, 0xFF92, 0xFF93, 0xFF94, 0xFF95, 0xFF96, 0xFF97,
+ 0xFF98, 0xFF99, 0xFF9A, 0xFF9B, 0xFF9C, 0xFF9D, 0xFF9E, 0xFF9F,
+ 0xFFA0, 0xFFA1, 0xFFA2, 0xFFA3, 0xFFA4, 0xFFA5, 0xFFA6, 0xFFA7,
+ 0xFFA8, 0xFFA9, 0xFFAA, 0xFFAB, 0xFFAC, 0xFFAD, 0xFFAE, 0xFFAF,
+ 0xFFB0, 0xFFB1, 0xFFB2, 0xFFB3, 0xFFB4, 0xFFB5, 0xFFB6, 0xFFB7,
+ 0xFFB8, 0xFFB9, 0xFFBA, 0xFFBB, 0xFFBC, 0xFFBD, 0xFFBE,
+};
+unsigned short * euc_to_utf8_2bytes[] = {
+                 euc_to_utf8_A1, euc_to_utf8_A2, euc_to_utf8_A3,
+ euc_to_utf8_A4, euc_to_utf8_A5, euc_to_utf8_A6, euc_to_utf8_A7,
+ euc_to_utf8_A8,              0,              0,              0,
+              0,              0,              0,              0,
+ euc_to_utf8_B0, euc_to_utf8_B1, euc_to_utf8_B2, euc_to_utf8_B3,
+ euc_to_utf8_B4, euc_to_utf8_B5, euc_to_utf8_B6, euc_to_utf8_B7,
+ euc_to_utf8_B8, euc_to_utf8_B9, euc_to_utf8_BA, euc_to_utf8_BB,
+ euc_to_utf8_BC, euc_to_utf8_BD, euc_to_utf8_BE, euc_to_utf8_BF,
+ euc_to_utf8_C0, euc_to_utf8_C1, euc_to_utf8_C2, euc_to_utf8_C3,
+ euc_to_utf8_C4, euc_to_utf8_C5, euc_to_utf8_C6, euc_to_utf8_C7,
+ euc_to_utf8_C8, euc_to_utf8_C9, euc_to_utf8_CA, euc_to_utf8_CB,
+ euc_to_utf8_CC, euc_to_utf8_CD, euc_to_utf8_CE, euc_to_utf8_CF,
+ euc_to_utf8_D0, euc_to_utf8_D1, euc_to_utf8_D2, euc_to_utf8_D3,
+ euc_to_utf8_D4, euc_to_utf8_D5, euc_to_utf8_D6, euc_to_utf8_D7,
+ euc_to_utf8_D8, euc_to_utf8_D9, euc_to_utf8_DA, euc_to_utf8_DB,
+ euc_to_utf8_DC, euc_to_utf8_DD, euc_to_utf8_DE, euc_to_utf8_DF,
+ euc_to_utf8_E0, euc_to_utf8_E1, euc_to_utf8_E2, euc_to_utf8_E3,
+ euc_to_utf8_E4, euc_to_utf8_E5, euc_to_utf8_E6, euc_to_utf8_E7,
+ euc_to_utf8_E8, euc_to_utf8_E9, euc_to_utf8_EA, euc_to_utf8_EB,
+ euc_to_utf8_EC, euc_to_utf8_ED, euc_to_utf8_EE, euc_to_utf8_EF,
+ euc_to_utf8_F0, euc_to_utf8_F1, euc_to_utf8_F2, euc_to_utf8_F3,
+ euc_to_utf8_F4,              0,              0,              0,
+              0,              0,              0,              0,
+              0,              0,              0,
+};
+#endif /* UTF8_OUTPUT_ENABLE */
+
+#ifdef UTF8_INPUT_ENABLE
+unsigned short utf8_to_euc_C2[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x2171, 0x2172,      0,      0,      0, 0x2178,
+ 0x212F,      0,      0,      0, 0x224C,      0,      0,      0,
+ 0x216B, 0x215E,      0,      0, 0x212D,      0, 0x2279,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_C3[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0, 0x215F,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0, 0x2160,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_CE[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x2621, 0x2622, 0x2623, 0x2624, 0x2625, 0x2626, 0x2627,
+ 0x2628, 0x2629, 0x262A, 0x262B, 0x262C, 0x262D, 0x262E, 0x262F,
+ 0x2630, 0x2631,      0, 0x2632, 0x2633, 0x2634, 0x2635, 0x2636,
+ 0x2637, 0x2638,      0,      0,      0,      0,      0,      0,
+      0, 0x2641, 0x2642, 0x2643, 0x2644, 0x2645, 0x2646, 0x2647,
+ 0x2648, 0x2649, 0x264A, 0x264B, 0x264C, 0x264D, 0x264E, 0x264F,
+};
+unsigned short utf8_to_euc_CF[] = {
+ 0x2650, 0x2651,      0, 0x2652, 0x2653, 0x2654, 0x2655, 0x2656,
+ 0x2657, 0x2658,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_D0[] = {
+      0, 0x2727,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0x2721, 0x2722, 0x2723, 0x2724, 0x2725, 0x2726, 0x2728, 0x2729,
+ 0x272A, 0x272B, 0x272C, 0x272D, 0x272E, 0x272F, 0x2730, 0x2731,
+ 0x2732, 0x2733, 0x2734, 0x2735, 0x2736, 0x2737, 0x2738, 0x2739,
+ 0x273A, 0x273B, 0x273C, 0x273D, 0x273E, 0x273F, 0x2740, 0x2741,
+ 0x2751, 0x2752, 0x2753, 0x2754, 0x2755, 0x2756, 0x2758, 0x2759,
+ 0x275A, 0x275B, 0x275C, 0x275D, 0x275E, 0x275F, 0x2760, 0x2761,
+};
+unsigned short utf8_to_euc_D1[] = {
+ 0x2762, 0x2763, 0x2764, 0x2765, 0x2766, 0x2767, 0x2768, 0x2769,
+ 0x276A, 0x276B, 0x276C, 0x276D, 0x276E, 0x276F, 0x2770, 0x2771,
+      0, 0x2757,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E280[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0x213E,      0,      0,      0,      0, 0x213D, 0x2142,      0,
+ 0x2146, 0x2147,      0,      0, 0x2148, 0x2149,      0,      0,
+ 0x2277, 0x2278,      0,      0,      0, 0x2145, 0x2144,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0x2273,      0, 0x216C, 0x216D,      0,      0,      0,      0,
+      0,      0,      0, 0x2228,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E284[] = {
+      0,      0,      0, 0x216E,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0, 0x2272,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E286[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0x222B, 0x222C, 0x222A, 0x222D,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E287[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x224D,      0, 0x224E,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E288[] = {
+ 0x224F,      0, 0x225F, 0x2250,      0,      0,      0, 0x2260,
+ 0x223A,      0,      0, 0x223B,      0,      0,      0,      0,
+      0,      0, 0x215D,      0,      0,      0,      0,      0,
+      0,      0, 0x2265,      0,      0, 0x2267, 0x2167,      0,
+ 0x225C,      0,      0,      0,      0, 0x2142,      0, 0x224A,
+ 0x224B, 0x2241, 0x2240, 0x2269, 0x226A,      0,      0,      0,
+      0,      0,      0,      0, 0x2168, 0x2268,      0,      0,
+      0,      0,      0,      0,      0, 0x2266,      0,      0,
+};
+unsigned short utf8_to_euc_E289[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x2262,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0x2162, 0x2261,      0,      0,      0,      0, 0x2165, 0x2166,
+      0,      0, 0x2263, 0x2264,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E28A[] = {
+      0,      0, 0x223E, 0x223F,      0,      0, 0x223C, 0x223D,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0, 0x225D,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E28C[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x225E,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E294[] = {
+ 0x2821, 0x282C, 0x2822, 0x282D,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x2823,      0,      0, 0x282E,
+ 0x2824,      0,      0, 0x282F, 0x2826,      0,      0, 0x2831,
+ 0x2825,      0,      0, 0x2830, 0x2827, 0x283C,      0,      0,
+ 0x2837,      0,      0, 0x2832, 0x2829, 0x283E,      0,      0,
+ 0x2839,      0,      0, 0x2834, 0x2828,      0,      0, 0x2838,
+ 0x283D,      0,      0, 0x2833, 0x282A,      0,      0, 0x283A,
+ 0x283F,      0,      0, 0x2835, 0x282B,      0,      0, 0x283B,
+};
+unsigned short utf8_to_euc_E295[] = {
+      0,      0, 0x2840,      0,      0,      0,      0,      0,
+      0,      0,      0, 0x2836,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E296[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0x2223, 0x2222,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x2225, 0x2224,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x2227, 0x2226,      0,      0,
+};
+unsigned short utf8_to_euc_E297[] = {
+      0,      0,      0,      0,      0,      0, 0x2221, 0x217E,
+      0,      0,      0, 0x217B,      0,      0, 0x217D, 0x217C,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0, 0x227E,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E298[] = {
+      0,      0,      0,      0,      0, 0x217A, 0x2179,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E299[] = {
+ 0x216A,      0, 0x2169,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x2276,      0,      0, 0x2275,      0, 0x2274,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E380[] = {
+ 0x2121, 0x2122, 0x2123, 0x2137,      0, 0x2139, 0x213A, 0x213B,
+ 0x2152, 0x2153, 0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159,
+ 0x215A, 0x215B, 0x2229, 0x222E, 0x214C, 0x214D,      0,      0,
+      0,      0,      0,      0, 0x2141,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E381[] = {
+      0, 0x2421, 0x2422, 0x2423, 0x2424, 0x2425, 0x2426, 0x2427,
+ 0x2428, 0x2429, 0x242A, 0x242B, 0x242C, 0x242D, 0x242E, 0x242F,
+ 0x2430, 0x2431, 0x2432, 0x2433, 0x2434, 0x2435, 0x2436, 0x2437,
+ 0x2438, 0x2439, 0x243A, 0x243B, 0x243C, 0x243D, 0x243E, 0x243F,
+ 0x2440, 0x2441, 0x2442, 0x2443, 0x2444, 0x2445, 0x2446, 0x2447,
+ 0x2448, 0x2449, 0x244A, 0x244B, 0x244C, 0x244D, 0x244E, 0x244F,
+ 0x2450, 0x2451, 0x2452, 0x2453, 0x2454, 0x2455, 0x2456, 0x2457,
+ 0x2458, 0x2459, 0x245A, 0x245B, 0x245C, 0x245D, 0x245E, 0x245F,
+};
+unsigned short utf8_to_euc_E382[] = {
+ 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467,
+ 0x2468, 0x2469, 0x246A, 0x246B, 0x246C, 0x246D, 0x246E, 0x246F,
+ 0x2470, 0x2471, 0x2472, 0x2473,      0,      0,      0,      0,
+      0,      0,      0, 0x212B, 0x212C, 0x2135, 0x2136,      0,
+      0, 0x2521, 0x2522, 0x2523, 0x2524, 0x2525, 0x2526, 0x2527,
+ 0x2528, 0x2529, 0x252A, 0x252B, 0x252C, 0x252D, 0x252E, 0x252F,
+ 0x2530, 0x2531, 0x2532, 0x2533, 0x2534, 0x2535, 0x2536, 0x2537,
+ 0x2538, 0x2539, 0x253A, 0x253B, 0x253C, 0x253D, 0x253E, 0x253F,
+};
+unsigned short utf8_to_euc_E383[] = {
+ 0x2540, 0x2541, 0x2542, 0x2543, 0x2544, 0x2545, 0x2546, 0x2547,
+ 0x2548, 0x2549, 0x254A, 0x254B, 0x254C, 0x254D, 0x254E, 0x254F,
+ 0x2550, 0x2551, 0x2552, 0x2553, 0x2554, 0x2555, 0x2556, 0x2557,
+ 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E, 0x255F,
+ 0x2560, 0x2561, 0x2562, 0x2563, 0x2564, 0x2565, 0x2566, 0x2567,
+ 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x256D, 0x256E, 0x256F,
+ 0x2570, 0x2571, 0x2572, 0x2573, 0x2574, 0x2575, 0x2576,      0,
+      0,      0,      0, 0x2126, 0x213C, 0x2133, 0x2134,      0,
+};
+unsigned short utf8_to_euc_E4B8[] = {
+ 0x306C, 0x437A,      0, 0x3C37,      0,      0,      0, 0x4B7C,
+ 0x3E66, 0x3B30, 0x3E65, 0x323C,      0, 0x4954, 0x4D3F,      0,
+ 0x5022, 0x312F,      0,      0, 0x336E, 0x5023, 0x4024, 0x5242,
+ 0x3556, 0x4A3A,      0,      0,      0,      0, 0x3E67,      0,
+      0, 0x4E3E,      0,      0,      0,      0, 0x4A42,      0,
+      0,      0, 0x5024,      0,      0, 0x4366,      0,      0,
+      0, 0x5025, 0x367A,      0,      0,      0, 0x5026,      0,
+ 0x345D, 0x4330,      0, 0x3C67, 0x5027,      0,      0, 0x5028,
+};
+unsigned short utf8_to_euc_E4B9[] = {
+      0,      0, 0x5029, 0x4735,      0, 0x3557,      0,      0,
+      0,      0,      0, 0x4737,      0, 0x4663, 0x3843, 0x4B33,
+      0,      0,      0,      0,      0, 0x6949, 0x502A, 0x3E68,
+ 0x502B, 0x3235,      0,      0,      0, 0x3665, 0x3870, 0x4C69,
+      0,      0, 0x5626,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x4D70,      0, 0x467D,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x3425,      0,
+};
+unsigned short utf8_to_euc_E4BA[] = {
+ 0x3535,      0, 0x502C,      0,      0, 0x502D, 0x4E3B,      0,
+ 0x4D3D, 0x4168, 0x502F, 0x3B76, 0x4673,      0, 0x5032,      0,
+      0, 0x313E, 0x385F,      0, 0x385E, 0x3066,      0,      0,
+ 0x4F4B, 0x4F4A,      0, 0x3A33, 0x3021,      0, 0x5033, 0x5034,
+ 0x5035, 0x4B34, 0x5036,      0, 0x3872, 0x3067, 0x4B72,      0,
+ 0x357C,      0,      0, 0x357D, 0x357E, 0x4462, 0x4E3C,      0,
+ 0x5037,      0,      0, 0x5038,      0,      0, 0x5039,      0,
+      0,      0, 0x3F4D,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E4BB[] = {
+ 0x3D3A, 0x3F4E, 0x503E,      0, 0x503C,      0, 0x503D, 0x3558,
+      0,      0, 0x3A23, 0x3270,      0, 0x503B, 0x503A, 0x4A29,
+      0,      0,      0,      0, 0x3B46, 0x3B45, 0x423E, 0x503F,
+ 0x4955, 0x4067,      0,      0,      0, 0x2138, 0x5040, 0x5042,
+      0,      0,      0, 0x4265, 0x4E61, 0x304A,      0,      0,
+      0,      0,      0,      0,      0, 0x5041, 0x323E,      0,
+ 0x3644,      0, 0x4367,      0,      0,      0, 0x376F, 0x5043,
+      0,      0,      0, 0x4724,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E4BC[] = {
+      0, 0x346B,      0,      0,      0,      0,      0,      0,
+      0, 0x5044, 0x304B,      0,      0, 0x3860, 0x346C, 0x497A,
+ 0x4832, 0x3559,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x3271,      0, 0x5067, 0x4541,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0, 0x476C,
+ 0x5046,      0,      0,      0, 0x483C,      0, 0x4E62,      0,
+ 0x3F2D,      0, 0x3B47,      0, 0x3B77, 0x3240,      0,      0,
+};
+unsigned short utf8_to_euc_E4BD[] = {
+      0,      0,      0, 0x4451,      0,      0, 0x4322, 0x504A,
+      0,      0,      0,      0,      0, 0x304C, 0x4463, 0x3D3B,
+ 0x3A34, 0x4D24,      0, 0x424E,      0, 0x323F,      0, 0x5049,
+      0, 0x4D3E, 0x5045, 0x5047, 0x3A6E, 0x5048, 0x5524,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x5050,      0,      0,      0,      0,      0, 0x5053,
+ 0x5051,      0,      0, 0x3242,      0, 0x4A3B, 0x504B,      0,
+      0,      0,      0, 0x504F, 0x3873,      0,      0, 0x3B48,
+};
+unsigned short utf8_to_euc_E4BE[] = {
+      0,      0,      0, 0x3426,      0,      0, 0x5054,      0,
+ 0x504C,      0,      0, 0x4E63,      0, 0x3B78,      0, 0x504D,
+      0, 0x5052,      0,      0,      0,      0, 0x5055,      0,
+ 0x504E,      0,      0, 0x3621,      0, 0x304D,      0,      0,
+ 0x3622, 0x3241,      0,      0,      0,      0,      0,      0,
+      0,      0,      0, 0x5525,      0, 0x4B79, 0x496E, 0x3874,
+      0,      0,      0,      0,      0, 0x3F2F, 0x4E37,      0,
+      0,      0,      0,      0,      0,      0,      0, 0x4A58,
+};
+unsigned short utf8_to_euc_E4BF[] = {
+      0,      0, 0x3738, 0x4225, 0x3264,      0,      0,      0,
+      0,      0, 0x3D53,      0,      0,      0, 0x5059,      0,
+ 0x505E, 0x505C,      0,      0, 0x5057,      0,      0, 0x422F,
+ 0x505A,      0, 0x505D, 0x505B,      0, 0x4A5D,      0, 0x5058,
+      0, 0x3F2E,      0, 0x4B73, 0x505F, 0x5060,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x3D24, 0x506D,
+      0,      0,      0, 0x4750,      0, 0x4936, 0x5068,      0,
+ 0x4A70,      0, 0x3236,      0,      0,      0, 0x506C,      0,
+};
+unsigned short utf8_to_euc_E580[] = {
+      0,      0,      0,      0,      0, 0x5066, 0x506F,      0,
+      0, 0x4152,      0, 0x3844,      0, 0x475C,      0, 0x6047,
+      0, 0x506E, 0x455D,      0, 0x5063,      0, 0x3876,      0,
+      0, 0x3875, 0x5061,      0,      0,      0,      0, 0x3C5A,
+      0, 0x5069,      0, 0x4A6F, 0x434D, 0x5065, 0x3771,      0,
+ 0x5062, 0x506A, 0x5064, 0x4E51, 0x506B, 0x4F41,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x3666,      0,
+      0, 0x3770,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E581[] = {
+      0,      0,      0, 0x5070,      0,      0,      0, 0x5071,
+ 0x5075, 0x304E,      0,      0,      0,      0,      0, 0x4A50,
+ 0x5074,      0,      0,      0,      0, 0x5073, 0x5077,      0,
+      0,      0, 0x5076,      0, 0x4464,      0,      0,      0,
+      0,      0,      0,      0,      0, 0x3772,      0,      0,
+      0,      0,      0,      0, 0x5078,      0,      0,      0,
+      0,      0, 0x3C45,      0, 0x4226, 0x4465, 0x3676,      0,
+ 0x5079,      0,      0,      0,      0, 0x3536,      0,      0,
+};
+unsigned short utf8_to_euc_E582[] = {
+ 0x507A,      0,      0,      0,      0, 0x507C,      0,      0,
+      0,      0,      0,      0,      0, 0x4B35,      0,      0,
+      0, 0x3766,      0,      0,      0,      0,      0,      0,
+ 0x3B31, 0x4877, 0x507B,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x3A45, 0x4D43,      0,      0,
+      0,      0, 0x507E, 0x5123, 0x507D, 0x3A44,      0, 0x3D7D,
+      0,      0,      0,      0,      0,      0, 0x3739,      0,
+};
+unsigned short utf8_to_euc_E583[] = {
+      0,      0, 0x5124,      0,      0, 0x364F,      0,      0,
+      0, 0x5121, 0x5122,      0,      0, 0x462F,      0, 0x417C,
+      0, 0x3623,      0,      0,      0, 0x4B4D, 0x5125,      0,
+      0,      0, 0x4E3D,      0,      0,      0, 0x5126,      0,
+      0,      0,      0, 0x5129,      0, 0x5127,      0, 0x414E,
+      0,      0,      0,      0,      0, 0x5128, 0x512A,      0,
+      0,      0,      0,      0,      0, 0x512C,      0,      0,
+      0, 0x512B,      0, 0x4A48,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E584[] = {
+ 0x3537, 0x512E, 0x512F,      0, 0x322F,      0,      0,      0,
+      0, 0x512D,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x3C74,      0, 0x5132, 0x5131, 0x5130,      0,
+ 0x5056,      0, 0x5133,      0,      0,      0,      0, 0x3D7E,
+      0, 0x5134,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x4D25,      0,      0,      0,      0,      0,
+      0,      0, 0x4C59,      0,      0,      0,      0, 0x5136,
+      0,      0, 0x5135, 0x5138, 0x5137,      0,      0, 0x5139,
+};
+unsigned short utf8_to_euc_E585[] = {
+ 0x513A, 0x3074,      0, 0x3835, 0x373B, 0x3D3C, 0x437B, 0x3624,
+ 0x4068, 0x3877,      0, 0x396E, 0x513C, 0x4C48, 0x4546,      0,
+ 0x3B79,      0, 0x513B,      0, 0x513D,      0,      0,      0,
+      0,      0, 0x455E,      0, 0x3375,      0,      0,      0,
+      0,      0, 0x513E,      0,      0, 0x467E,      0,      0,
+ 0x4134, 0x5140, 0x5141, 0x482C, 0x3878, 0x4F3B, 0x5142,      0,
+      0, 0x3626,      0,      0,      0, 0x4A3C, 0x4236, 0x3671,
+ 0x4535,      0,      0,      0, 0x3773,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E586[] = {
+ 0x5143,      0, 0x5144,      0,      0, 0x4662, 0x315F,      0,
+      0, 0x5147, 0x3A7D,      0, 0x5146, 0x3A46,      0, 0x5148,
+ 0x666E, 0x5149, 0x4B41, 0x514A,      0, 0x514B, 0x514C, 0x3E69,
+      0, 0x3C4C,      0,      0,      0,      0,      0,      0,
+ 0x3427,      0, 0x514F,      0, 0x514D, 0x4C3D, 0x514E,      0,
+ 0x495A, 0x5150, 0x5151, 0x5152, 0x455F,      0,      0,      0,
+ 0x5156, 0x5154, 0x5155, 0x5153, 0x3A63, 0x5157, 0x4C6A, 0x4E64,
+      0,      0,      0,      0,      0, 0x5158,      0,      0,
+};
+unsigned short utf8_to_euc_E587[] = {
+      0,      0,      0,      0, 0x4028, 0x5159, 0x3D5A,      0,
+      0, 0x515A,      0, 0x437C, 0x4E3F, 0x4560,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x5245,      0,
+      0,      0,      0, 0x515B, 0x7425, 0x3645,      0,      0,
+ 0x515C, 0x4B5E,      0,      0,      0,      0, 0x3D68, 0x427C,
+      0, 0x515E, 0x4664,      0,      0, 0x515F,      0,      0,
+ 0x5160, 0x332E,      0,      0,      0, 0x5161, 0x3627,      0,
+ 0x464C, 0x317A, 0x3D50,      0,      0, 0x4821, 0x5162,      0,
+};
+unsigned short utf8_to_euc_E588[] = {
+ 0x4561,      0,      0, 0x3F4F, 0x5163,      0, 0x4A2C, 0x405A,
+ 0x3422,      0, 0x3429, 0x5164,      0,      0, 0x5166,      0,
+      0, 0x373A,      0,      0, 0x5165,      0,      0, 0x4E73,
+      0,      0,      0,      0,      0, 0x3D69,      0,      0,
+      0,      0,      0,      0, 0x483D, 0x4A4C,      0, 0x5167,
+      0, 0x4D78, 0x5168,      0,      0,      0, 0x5169,      0,
+ 0x457E,      0,      0, 0x516A,      0,      0, 0x4029, 0x3A7E,
+ 0x3774, 0x516B, 0x3B49, 0x396F,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E589[] = {
+      0,      0,      0, 0x4466, 0x516D,      0,      0, 0x4227,
+      0,      0, 0x3A6F, 0x516E, 0x516F, 0x4130,      0, 0x516C,
+      0,      0,      0,      0, 0x5171,      0, 0x4B36,      0,
+      0,      0,      0, 0x3964,      0,      0, 0x5170,      0,
+      0,      0,      0, 0x3775, 0x3A5E, 0x476D,      0,      0,
+      0, 0x5174, 0x5172,      0,      0,      0,      0, 0x497B,
+ 0x3E6A, 0x517B, 0x3364, 0x5175, 0x5173, 0x414F,      0,      0,
+      0,      0,      0,      0,      0, 0x5177,      0, 0x5176,
+};
+unsigned short utf8_to_euc_E58A[] = {
+      0,      0,      0, 0x3344,      0,      0,      0, 0x3760,
+ 0x517C, 0x4E2D,      0,      0,      0, 0x5178,      0,      0,
+      0, 0x517D, 0x517A,      0, 0x5179,      0,      0,      0,
+      0,      0,      0, 0x4E4F,      0,      0,      0, 0x3879,
+ 0x3243,      0,      0, 0x4E74,      0,      0,      0,      0,
+      0, 0x3D75, 0x4558, 0x3965, 0x5222, 0x5223,      0,      0,
+      0, 0x4E65,      0,      0, 0x4F2B, 0x5225,      0,      0,
+      0, 0x387A,      0,      0, 0x5224,      0, 0x332F,      0,
+};
+unsigned short utf8_to_euc_E58B[] = {
+      0, 0x5226,      0, 0x4B56,      0, 0x443C,      0, 0x4D26,
+      0, 0x4A59,      0,      0,      0, 0x5227,      0,      0,
+      0,      0, 0x7055,      0,      0, 0x4630,      0, 0x5228,
+ 0x342A, 0x4C33,      0,      0,      0, 0x3E21, 0x5229, 0x4A67,
+ 0x522D,      0, 0x402A, 0x522A, 0x3650,      0, 0x522B, 0x342B,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x372E, 0x522E,      0, 0x522F,      0,      0,
+ 0x5230, 0x5231, 0x3C5B,      0,      0,      0, 0x387B, 0x4C5E,
+};
+unsigned short utf8_to_euc_E58C[] = {
+      0, 0x4C68, 0x4677,      0,      0, 0x4A71, 0x5232,      0,
+ 0x5233,      0,      0,      0,      0, 0x5235,      0, 0x5237,
+ 0x5236,      0,      0,      0,      0, 0x5238, 0x323D, 0x4B4C,
+      0, 0x3A7C, 0x5239,      0,      0, 0x4159,      0,      0,
+ 0x3E22, 0x3629,      0, 0x523A,      0,      0,      0,      0,
+      0,      0, 0x485B,      0,      0,      0,      0, 0x523B,
+      0, 0x523C,      0, 0x523D,      0,      0,      0,      0,
+ 0x523E, 0x4924, 0x3668, 0x3065,      0,      0,      0, 0x463F,
+};
+unsigned short utf8_to_euc_E58D[] = {
+ 0x523F, 0x3D3D,      0, 0x4069,      0, 0x5241, 0x5240, 0x3E23,
+ 0x3861, 0x5243, 0x483E,      0,      0, 0x5244,      0,      0,
+      0, 0x485C, 0x4234, 0x426E, 0x3628,      0,      0, 0x466E,
+ 0x4331,      0, 0x476E,      0, 0x4B4E,      0, 0x5246,      0,
+ 0x406A,      0,      0,      0,      0,      0, 0x3735,      0,
+      0, 0x5247,      0,      0,      0,      0, 0x5248, 0x312C,
+ 0x3075, 0x346D,      0, 0x4228, 0x3551, 0x4D71,      0, 0x524B,
+ 0x3237,      0,      0, 0x524A,      0,      0,      0, 0x362A,
+};
+unsigned short utf8_to_euc_E58E[] = {
+      0,      0, 0x524C,      0, 0x4C71,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x524D,      0,
+ 0x4E52,      0, 0x387C,      0,      0,      0,      0, 0x3836,
+ 0x524E,      0,      0,      0,      0, 0x5250, 0x524F,      0,
+ 0x3F5F, 0x3139,      0,      0,      0, 0x315E, 0x5251,      0,
+ 0x5252,      0,      0, 0x3837,      0,      0, 0x5253,      0,
+      0,      0,      0, 0x356E,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E58F[] = {
+      0,      0, 0x3B32, 0x5254,      0,      0,      0,      0,
+ 0x4B74, 0x3A35, 0x355A, 0x4D27, 0x4150, 0x483F, 0x3C7D,      0,
+      0,      0,      0,      0, 0x3D47,      0, 0x3C68, 0x3C75,
+      0, 0x3D76,      0, 0x4840,      0,      0,      0, 0x5257,
+      0, 0x3143, 0x4151, 0x387D, 0x3845, 0x3667,      0,      0,
+ 0x525B, 0x4321, 0x427E, 0x362B, 0x3E24, 0x525C, 0x525A, 0x3244,
+ 0x4266, 0x3C38, 0x3B4B, 0x3126,      0,      0, 0x3370, 0x3966,
+ 0x3B4A,      0, 0x525D,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E590[] = {
+      0, 0x525E,      0, 0x3549, 0x3346,      0,      0,      0,
+ 0x3967, 0x3548, 0x445F, 0x3125, 0x4631, 0x4C3E, 0x3921, 0x4D79,
+ 0x4547, 0x387E,      0,      0,      0,      0,      0,      0,
+      0,      0,      0, 0x372F,      0, 0x5267,      0, 0x3663,
+ 0x4B4A,      0,      0,      0,      0,      0, 0x485D,      0,
+      0, 0x5266,      0, 0x345E, 0x5261, 0x5262, 0x5264,      0,
+      0,      0,      0,      0,      0,      0, 0x5265,      0,
+ 0x355B, 0x3F61,      0, 0x4A2D, 0x5263, 0x525F, 0x3863,      0,
+};
+unsigned short utf8_to_euc_E591[] = {
+ 0x5260,      0, 0x4F24,      0,      0,      0, 0x4A72,      0,
+ 0x4468, 0x3862, 0x3970,      0,      0,      0, 0x5268,      0,
+      0, 0x465D,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0, 0x526C,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0x3C7E,      0, 0x3C76,      0,      0,      0,      0,      0,
+ 0x526F, 0x526D,      0, 0x4C23,      0, 0x526A, 0x5273, 0x526E,
+      0,      0,      0, 0x5271, 0x3846, 0x4C3F,      0,      0,
+};
+unsigned short utf8_to_euc_E592[] = {
+ 0x5272,      0,      0,      0, 0x5274,      0, 0x5276,      0,
+      0,      0,      0, 0x3A70, 0x4F42,      0, 0x526B, 0x5269,
+ 0x5275,      0, 0x5270,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x5278,      0, 0x5323, 0x527A,      0,      0,
+ 0x527E,      0,      0, 0x5321, 0x527B,      0,      0, 0x533E,
+      0,      0, 0x3A69, 0x3331,      0,      0,      0,      0,
+ 0x5279,      0,      0,      0, 0x5325, 0x3076, 0x5324,      0,
+};
+unsigned short utf8_to_euc_E593[] = {
+ 0x3025, 0x494A, 0x5322,      0, 0x527C,      0,      0, 0x5277,
+ 0x527D, 0x3A48,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0x5326,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x3077, 0x532F,      0,      0, 0x5327, 0x5328,      0,
+ 0x3E25, 0x4B69,      0,      0,      0, 0x532D, 0x532C,      0,
+      0,      0, 0x452F,      0,      0,      0,      0,      0,
+      0,      0, 0x532E,      0,      0, 0x532B,      0,      0,
+};
+unsigned short utf8_to_euc_E594[] = {
+      0,      0,      0,      0, 0x3134,      0, 0x3A36, 0x3F30,
+      0,      0,      0,      0,      0,      0,      0, 0x5329,
+ 0x4562,      0,      0,      0, 0x532A,      0, 0x3022,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x5334, 0x4D23,
+      0, 0x3E27,      0, 0x533A,      0,      0,      0,      0,
+ 0x5339, 0x5330,      0,      0,      0,      0, 0x4243,      0,
+};
+unsigned short utf8_to_euc_E595[] = {
+ 0x5331,      0,      0,      0, 0x426F, 0x5336, 0x3E26,      0,
+      0,      0,      0,      0, 0x5333,      0,      0, 0x4C64,
+      0,      0,      0, 0x373C,      0,      0, 0x5337, 0x5338,
+      0,      0,      0,      0, 0x5335, 0x533B,      0,      0,
+      0,      0,      0, 0x5332,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0, 0x5341, 0x5346,      0, 0x5342,      0,
+};
+unsigned short utf8_to_euc_E596[] = {
+ 0x533D,      0,      0, 0x5347, 0x4131,      0,      0, 0x5349,
+      0, 0x3922, 0x533F, 0x437D,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0x5343, 0x533C, 0x342D,      0, 0x346E, 0x3365, 0x5344, 0x5340,
+      0,      0,      0,      0,      0,      0,      0, 0x3776,
+ 0x534A, 0x5348, 0x4153, 0x354A, 0x362C,      0, 0x5345,      0,
+ 0x3674,      0,      0,      0,      0,      0, 0x3144,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E597[] = {
+      0,      0,      0,      0, 0x534E, 0x534C,      0, 0x5427,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x5351,      0,      0,      0,
+      0,      0, 0x534B,      0, 0x534F,      0,      0, 0x534D,
+      0,      0,      0, 0x3B4C, 0x5350,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0, 0x5353,
+      0, 0x5358,      0,      0,      0, 0x5356, 0x5355,      0,
+};
+unsigned short utf8_to_euc_E598[] = {
+      0,      0,      0,      0,      0,      0, 0x4332,      0,
+      0, 0x3245,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x5352,      0, 0x5354, 0x3E28,
+ 0x3133,      0,      0, 0x5357,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x325E,      0,      0,      0,      0,      0, 0x5362,
+      0, 0x3E7C, 0x535E,      0, 0x535C,      0, 0x535D,      0,
+ 0x535F,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E599[] = {
+      0,      0, 0x313D,      0,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x4139,      0, 0x5359,      0,
+ 0x535A,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0, 0x337A,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x5361,      0,      0,      0,
+ 0x346F,      0, 0x5364, 0x5360, 0x5363,      0,      0,      0,
+      0,      0,      0,      0, 0x4A2E,      0,      0,      0,
+ 0x4655,      0, 0x4838,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E59A[] = {
+ 0x5366,      0,      0,      0,      0,      0, 0x5365, 0x3345,
+      0,      0, 0x5367,      0,      0,      0,      0, 0x536A,
+      0,      0,      0,      0, 0x5369,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0x5368,      0, 0x4739,      0,      0, 0x536B,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x536C,      0,
+      0,      0,      0,      0, 0x536E,      0, 0x536D,      0,
+      0,      0,      0,      0, 0x5370,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E59B[] = {
+ 0x5373, 0x5371, 0x536F, 0x5372,      0,      0,      0,      0,
+ 0x5374,      0,      0,      0,      0,      0, 0x5375,      0,
+      0, 0x5376,      0, 0x5377,      0,      0,      0, 0x5378,
+ 0x5145,      0, 0x3C7C, 0x3B4D,      0,      0, 0x3273,      0,
+ 0x3078,      0,      0, 0x4344,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x5379,      0,
+ 0x3A24,      0, 0x304F, 0x3F5E,      0,      0,      0,      0,
+      0, 0x537A, 0x3847,      0,      0, 0x3971,      0, 0x537C,
+};
+unsigned short utf8_to_euc_E59C[] = {
+ 0x537B,      0,      0, 0x4A60, 0x537D,      0,      0,      0,
+ 0x5421, 0x537E,      0, 0x5422,      0, 0x5423,      0, 0x3777,
+      0,      0, 0x3160, 0x5424,      0,      0, 0x5426,      0,
+ 0x5425,      0,      0,      0, 0x5428,      0,      0, 0x455A,
+      0,      0,      0,      0,      0,      0, 0x5429, 0x3035,
+ 0x3A5F,      0,      0,      0,      0, 0x373D,      0,      0,
+ 0x434F,      0,      0,      0,      0,      0,      0, 0x542A,
+ 0x542B,      0,      0, 0x542D,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E59D[] = {
+ 0x542E,      0, 0x3A64,      0,      0,      0,      0, 0x3651,
+      0,      0, 0x4B37,      0,      0,      0, 0x542C, 0x542F,
+ 0x3A41, 0x3923,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x5433,      0,      0, 0x3A25,      0, 0x4333,      0,
+      0, 0x5430, 0x445A,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0, 0x5434,
+};
+unsigned short utf8_to_euc_E59E[] = {
+      0,      0, 0x3F62,      0,      0,      0,      0,      0,
+ 0x5432, 0x5435,      0, 0x373F,      0,      0,      0,      0,
+      0,      0,      0, 0x5436,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0x5437,      0, 0x3924, 0x3340, 0x5439,      0,      0,      0,
+      0,      0, 0x543A,      0,      0,      0,      0,      0,
+ 0x543B,      0,      0, 0x5438,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E59F[] = {
+ 0x5431,      0,      0, 0x543C,      0,      0, 0x543D,      0,
+      0,      0,      0, 0x4B64,      0,      0, 0x3E6B,      0,
+      0,      0, 0x543F, 0x5440, 0x543E,      0, 0x5442,      0,
+      0,      0,      0,      0, 0x4738,      0,      0, 0x3068,
+ 0x4956,      0,      0, 0x5443,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x3E7D,      0,      0, 0x3C39,
+      0, 0x475D, 0x3470,      0, 0x3A6B,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E5A0[] = {
+ 0x4B59,      0, 0x4632,      0,      0, 0x3778, 0x424F,      0,
+      0,      0, 0x5441, 0x5444,      0,      0,      0,      0,
+      0,      0,      0,      0,      0, 0x4244,      0,      0,
+      0, 0x5445,      0,      0,      0, 0x5446,      0,      0,
+      0, 0x5448,      0,      0, 0x4469,      0,      0,      0,
+      0,      0, 0x342E,      0,      0,      0,      0, 0x7421,
+ 0x3161, 0x4A73,      0,      0, 0x3E6C, 0x4548,      0,      0,
+      0,      0, 0x3A66,      0,      0, 0x544E,      0,      0,
+};
+unsigned short utf8_to_euc_E5A1[] = {
+ 0x4A3D, 0x4E5D,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x3274, 0x544A,      0,      0,      0,      0,
+      0, 0x413A, 0x544D,      0, 0x4563,      0,      0, 0x4549,
+ 0x4564, 0x4839, 0x444D,      0,      0,      0, 0x3A49,      0,
+      0,      0, 0x5449,      0,      0,      0,      0,      0,
+      0, 0x3176,      0, 0x4536,      0,      0,      0,      0,
+ 0x544B,      0, 0x5447,      0,      0, 0x3F50,      0,      0,
+      0, 0x544F,      0,      0,      0,      0, 0x3D4E,      0,
+};
+unsigned short utf8_to_euc_E5A2[] = {
+      0,      0,      0, 0x362D,      0, 0x5450,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0, 0x4A68,      0,      0,      0, 0x417D,
+      0,      0,      0,      0, 0x4446,      0,      0, 0x5452,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0x4B4F,      0,      0, 0x5453,      0,      0, 0x5458,      0,
+      0,      0,      0, 0x4A2F,      0,      0,      0,      0,
+ 0x5457, 0x5451, 0x5454, 0x5456,      0,      0, 0x3A26,      0,
+};
+unsigned short utf8_to_euc_E5A3[] = {
+      0, 0x4A49,      0,      0,      0, 0x5459,      0, 0x4345,
+      0,      0, 0x3275,      0, 0x3E6D,      0,      0,      0,
+      0, 0x545B,      0, 0x545A,      0, 0x3968,      0, 0x545C,
+ 0x545E, 0x545D,      0,      0, 0x5460,      0, 0x5455, 0x5462,
+      0,      0,      0,      0, 0x5461, 0x545F,      0,      0,
+      0,      0,      0, 0x3B4E, 0x3F51,      0, 0x4154, 0x5463,
+ 0x403C, 0x306D, 0x4764,      0,      0,      0,      0, 0x445B,
+      0, 0x5465, 0x5464, 0x5466, 0x5467, 0x5468,      0,      0,
+};
+unsigned short utf8_to_euc_E5A4[] = {
+      0,      0, 0x5469,      0,      0,      0,      0,      0,
+      0, 0x4A51, 0x546A,      0,      0,      0,      0, 0x3246,
+ 0x546B,      0,      0,      0,      0, 0x4D3C, 0x3330,      0,
+ 0x5249, 0x3D48, 0x423F, 0x546C, 0x4C6B,      0,      0,      0,
+      0,      0, 0x4C34,      0,      0, 0x546E,      0, 0x4267,
+      0, 0x4537, 0x4240, 0x4957, 0x546F, 0x5470, 0x317B,      0,
+      0, 0x3C3A, 0x5471,      0,      0,      0,      0, 0x3050,
+ 0x5472,      0,      0,      0,      0,      0, 0x5473,      0,
+};
+unsigned short utf8_to_euc_E5A5[] = {
+      0,      0,      0,      0, 0x3162,      0,      0, 0x3471,
+ 0x4660, 0x4A74,      0,      0,      0,      0, 0x5477, 0x4155,
+ 0x5476, 0x3740,      0,      0, 0x4B5B, 0x5475,      0, 0x4565,
+ 0x5479,      0, 0x5478,      0,      0,      0,      0,      0,
+ 0x547B,      0, 0x547A,      0,      0, 0x317C,      0, 0x547C,
+ 0x3E29, 0x547E, 0x4325,      0, 0x547D,      0, 0x4A33,      0,
+      0,      0,      0, 0x3D77, 0x455B,      0,      0,      0,
+ 0x5521,      0,      0,      0,      0, 0x3925,      0,      0,
+};
+unsigned short utf8_to_euc_E5A6[] = {
+      0, 0x5522, 0x4721, 0x485E, 0x4C51,      0,      0,      0,
+      0,      0, 0x4725,      0,      0, 0x552B,      0,      0,
+      0,      0,      0, 0x3538,      0,      0, 0x4D45,      0,
+      0, 0x4C2F,      0, 0x562C,      0, 0x5523,      0,      0,
+      0,      0,      0, 0x5526,      0, 0x4245,      0,      0,
+ 0x4B38,      0,      0,      0, 0x454A,      0,      0,      0,
+      0,      0, 0x5527,      0,      0,      0,      0,      0,
+      0, 0x4B65,      0, 0x3A4A,      0,      0, 0x3E2A,      0,
+};
+unsigned short utf8_to_euc_E5A7[] = {
+      0,      0,      0,      0,      0,      0, 0x5528,      0,
+      0, 0x3B50,      0, 0x3B4F,      0,      0,      0,      0,
+ 0x3039, 0x3848,      0, 0x402B, 0x3051,      0,      0,      0,
+      0, 0x552C, 0x552D,      0, 0x552A,      0,      0,      0,
+      0,      0,      0,      0,      0, 0x3138, 0x342F,      0,
+ 0x5529,      0, 0x4C45, 0x4931,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x3028,      0,
+      0,      0,      0, 0x3079,      0,      0,      0, 0x3B51,
+};
+unsigned short utf8_to_euc_E5A8[] = {
+      0, 0x3052,      0, 0x3023,      0,      0,      0,      0,
+      0, 0x5532,      0,      0,      0,      0,      0,      0,
+      0, 0x5530,      0,      0,      0,      0,      0,      0,
+ 0x4C3C,      0, 0x5533,      0, 0x5531,      0,      0, 0x552F,
+ 0x3F31,      0,      0,      0,      0, 0x552E,      0,      0,
+      0, 0x4A5A,      0,      0,      0,      0,      0, 0x3864,
+      0,      0,      0,      0,      0, 0x5537, 0x5538,      0,
+      0,      0,      0,      0, 0x3E2B,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E5A9[] = {
+ 0x5534, 0x4F2C,      0,      0,      0,      0, 0x474C,      0,
+      0, 0x5536,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x3A27,      0,      0,      0,      0,      0,
+      0,      0, 0x5539,      0,      0,      0, 0x4958,      0,
+      0,      0, 0x553A,      0, 0x5535,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0, 0x4C3B,
+};
+unsigned short utf8_to_euc_E5AA[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x475E,      0,      0,      0,      0,      0,
+      0,      0, 0x553B, 0x4932,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x553C, 0x5540, 0x553D,      0,
+};
+unsigned short utf8_to_euc_E5AB[] = {
+      0, 0x3247, 0x553F,      0,      0,      0,      0,      0,
+      0, 0x3C3B,      0, 0x553E, 0x3779,      0,      0,      0,
+ 0x554C,      0,      0,      0,      0,      0, 0x5545, 0x5542,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x4364,      0, 0x5541,      0,      0, 0x5543,      0,
+      0, 0x5544,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x5546, 0x5547,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E5AC[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x3472,      0, 0x5549, 0x5548,      0,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x554A,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x3E6E,      0,      0,      0,      0,      0,
+      0,      0, 0x554D,      0, 0x445C,      0,      0,      0,
+ 0x3145,      0, 0x554B,      0,      0,      0, 0x554E,      0,
+      0,      0,      0,      0,      0,      0, 0x554F,      0,
+};
+unsigned short utf8_to_euc_E5AD[] = {
+ 0x5552,      0,      0, 0x5550,      0, 0x5551,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+ 0x3B52, 0x5553,      0,      0, 0x3926, 0x5554,      0, 0x3B7A,
+ 0x4238,      0, 0x5555, 0x5556, 0x3B5A, 0x3927,      0, 0x4C52,
+      0,      0,      0, 0x3528, 0x3849, 0x5557, 0x3358,      0,
+      0, 0x5558,      0, 0x4239,      0,      0,      0,      0,
+ 0x5559, 0x5623,      0, 0x555A,      0, 0x555B,      0,      0,
+ 0x555C,      0, 0x555E,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E5AE[] = {
+ 0x555F,      0,      0, 0x5560,      0, 0x4270,      0, 0x3127,
+ 0x3C69, 0x3042,      0, 0x4157, 0x3430, 0x3C35,      0, 0x3928,
+      0,      0,      0,      0,      0, 0x4566,      0, 0x3D21,
+ 0x3431, 0x4368, 0x446A, 0x3038, 0x3539, 0x4A75,      0, 0x3C42,
+      0,      0, 0x3552, 0x406B, 0x3C3C, 0x4D28, 0x5561,      0,
+      0,      0,      0,      0,      0,      0, 0x355C,      0,
+ 0x3A4B,      0,      0, 0x3332, 0x3163, 0x3E2C, 0x3248,      0,
+ 0x5562, 0x4D46,      0,      0,      0,      0,      0, 0x3D49,
+};
+unsigned short utf8_to_euc_E5AF[] = {
+      0,      0, 0x3C64, 0x5563, 0x3473, 0x4652, 0x4C29, 0x5564,
+      0, 0x5565,      0,      0, 0x4959,      0,      0,      0,
+ 0x5567,      0, 0x3428, 0x3677, 0x5566,      0,      0,      0,
+      0,      0,      0, 0x3432,      0, 0x3F32, 0x556B, 0x3B21,
+      0, 0x3249, 0x556A,      0, 0x5568, 0x556C, 0x5569, 0x472B,
+ 0x5C4D, 0x3F33,      0, 0x556D,      0,      0, 0x4E40,      0,
+ 0x556E,      0,      0, 0x5570,      0, 0x437E, 0x556F,      0,
+ 0x4023,      0, 0x3B7B,      0,      0,      0, 0x4250, 0x3C77,
+};
+unsigned short utf8_to_euc_E5B0[] = {
+      0, 0x4975, 0x406C,      0, 0x3C4D, 0x5571, 0x3E2D, 0x5572,
+ 0x5573, 0x3053, 0x423A, 0x3F52,      0, 0x5574, 0x4633, 0x3E2E,
+      0, 0x3E2F,      0, 0x5575,      0,      0, 0x406D,      0,
+      0,      0, 0x3E30,      0,      0,      0,      0,      0,
+ 0x5576,      0, 0x5577,      0, 0x4C60,      0,      0,      0,
+ 0x5578,      0,      0,      0,      0, 0x3646,      0,      0,
+      0, 0x3D22,      0,      0,      0,      0,      0,      0,
+ 0x5579, 0x557A, 0x3C5C, 0x3F2C, 0x4674, 0x3F54, 0x4878, 0x4722,
+};
+unsigned short utf8_to_euc_E5B1[] = {
+ 0x3649, 0x557B,      0,      0,      0, 0x356F, 0x557C,      0,
+ 0x367E,      0, 0x464F, 0x3230,      0, 0x3B53, 0x557D, 0x5622,
+ 0x5621, 0x367D,      0, 0x557E,      0, 0x4538,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x4230,      0,
+ 0x454B, 0x3C48,      0,      0, 0x4158, 0x4D7A,      0,      0,
+      0,      0,      0,      0, 0x5624,      0, 0x5625, 0x4656,
+      0, 0x3B33,      0,      0,      0,      0, 0x5627,      0,
+      0, 0x5628,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E5B2[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x5629,      0,      0,      0,
+ 0x3474, 0x562A,      0,      0, 0x562B,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x322C,      0,      0,      0,      0,      0,      0,
+ 0x413B, 0x3464,      0, 0x562D, 0x4C28,      0,      0,      0,
+      0, 0x4252,      0, 0x3359,      0,      0, 0x562F, 0x5631,
+ 0x345F,      0,      0, 0x562E, 0x5630,      0, 0x5633,      0,
+};
+unsigned short utf8_to_euc_E5B3[] = {
+      0,      0,      0,      0,      0, 0x5632,      0, 0x5634,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x5635,      0,      0,      0,      0,      0,      0,
+ 0x463D, 0x362E,      0,      0,      0,      0,      0,      0,
+ 0x3265, 0x5636, 0x563B,      0,      0, 0x5639,      0, 0x4A77,
+ 0x4A76,      0,      0,      0,      0,      0, 0x4567,      0,
+      0,      0, 0x5638, 0x3D54,      0, 0x5637,      0,      0,
+};
+unsigned short utf8_to_euc_E5B4[] = {
+      0,      0,      0,      0,      0,      0,      0, 0x3F72,
+      0,      0,      0, 0x563C,      0,      0, 0x3A6A,      0,
+      0, 0x5642,      0,      0, 0x5643, 0x563D, 0x3333, 0x563E,
+ 0x5647, 0x5646, 0x5645, 0x5641,      0,      0,      0, 0x5640,
+      0,      0, 0x5644,      0,      0,      0,      0,      0,
+      0, 0x4A78,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E5B5[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0, 0x564B, 0x5648,      0, 0x564A,      0,
+ 0x4D72,      0, 0x5649,      0,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x563F,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x3F73,      0,      0, 0x564C,      0,      0, 0x3A37,
+      0,      0,      0, 0x564D,      0,      0, 0x564E,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E5B6[] = {
+      0,      0, 0x5651,      0, 0x5650,      0,      0, 0x564F,
+      0,      0,      0, 0x4568, 0x563A,      0,      0,      0,
+ 0x5657,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0, 0x5653,      0,      0,
+      0,      0, 0x5652,      0,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x5654,      0, 0x5655,      0,
+      0,      0,      0,      0,      0,      0,      0, 0x5658,
+      0,      0, 0x4E66,      0, 0x5659, 0x5656,      0,      0,
+};
+unsigned short utf8_to_euc_E5B7[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x565A,      0,      0, 0x3460, 0x565B,      0,      0,
+      0,      0, 0x565D, 0x565C,      0,      0, 0x565E,      0,
+      0,      0,      0, 0x565F,      0, 0x406E, 0x3D23,      0,
+      0, 0x3D64,      0, 0x4163,      0, 0x3929, 0x3A38, 0x392A,
+ 0x3570,      0,      0, 0x5660,      0,      0, 0x3A39,      0,
+      0, 0x384A, 0x5661, 0x4C26, 0x4743, 0x5662,      0, 0x392B,
+      0,      0,      0, 0x342C,      0, 0x4327, 0x3652,      0,
+};
+unsigned short utf8_to_euc_E5B8[] = {
+      0,      0, 0x3B54, 0x495B,      0,      0, 0x4841,      0,
+      0,      0,      0, 0x5663, 0x3475,      0,      0,      0,
+      0, 0x5666,      0,      0,      0,      0, 0x4421,      0,
+      0, 0x5665, 0x5664, 0x5667,      0, 0x446B,      0,      0,
+      0,      0,      0,      0,      0, 0x3F63,      0,      0,
+      0,      0,      0, 0x3B55,      0, 0x404A,      0, 0x4253,
+ 0x3522,      0,      0, 0x4422,      0,      0, 0x5668, 0x5669,
+ 0x3E6F,      0,      0,      0,      0, 0x4B39,      0,      0,
+};
+unsigned short utf8_to_euc_E5B9[] = {
+ 0x566C,      0,      0, 0x566B, 0x566A, 0x497D,      0, 0x5673,
+      0,      0,      0,      0, 0x4B5A,      0, 0x566D,      0,
+      0,      0,      0,      0, 0x566F, 0x4B6B,      0, 0x566E,
+      0,      0,      0,      0,      0,      0,      0, 0x5670,
+      0, 0x4828, 0x5671, 0x4A3E, 0x5672,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x3433, 0x4A3F, 0x472F, 0x5674, 0x5675,      0,
+ 0x392C, 0x3434, 0x5676, 0x3838, 0x4D44, 0x4D29, 0x3476, 0x5678,
+};
+unsigned short utf8_to_euc_E5BA[] = {
+      0, 0x4423,      0, 0x392D, 0x3E31,      0,      0, 0x485F,
+      0,      0, 0x3E32,      0,      0,      0,      0, 0x3D78,
+      0,      0,      0,      0,      0, 0x446C, 0x4A79, 0x4539,
+      0,      0, 0x392E,      0, 0x495C,      0,      0,      0,
+ 0x5679,      0,      0,      0,      0,      0, 0x4559, 0x3A42,
+      0,      0,      0, 0x384B,      0, 0x446D,      0,      0,
+      0,      0,      0,      0,      0, 0x3043, 0x3D6E, 0x392F,
+ 0x4D47,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E5BB[] = {
+      0, 0x567A, 0x567B, 0x4751,      0,      0,      0,      0,
+ 0x567C, 0x4E77, 0x4F2D,      0,      0,      0,      0, 0x567E,
+ 0x567D,      0,      0, 0x3347,      0,      0, 0x5721,      0,
+      0,      0, 0x5724, 0x5725,      0, 0x5723,      0, 0x4940,
+ 0x3E33, 0x5727, 0x5726, 0x5722,      0,      0,      0,      0,
+ 0x5728, 0x5729,      0,      0, 0x572A,      0,      0,      0,
+ 0x572D, 0x572B,      0, 0x572C, 0x572E,      0, 0x3164, 0x446E,
+ 0x572F,      0, 0x377A, 0x3276, 0x4736,      0, 0x5730, 0x467B,
+};
+unsigned short utf8_to_euc_E5BC[] = {
+      0, 0x4A5B,      0, 0x5731, 0x4F2E,      0,      0,      0,
+      0, 0x5732, 0x4A40, 0x5735, 0x5021, 0x5031,      0, 0x3C30,
+ 0x4675, 0x5736,      0, 0x355D, 0x4424, 0x307A, 0x5737, 0x4A26,
+ 0x3930,      0,      0, 0x4350,      0,      0,      0, 0x446F,
+      0,      0,      0,      0,      0, 0x4C6F, 0x3839, 0x384C,
+      0, 0x5738,      0,      0,      0, 0x5739,      0, 0x573F,
+      0, 0x3C65,      0,      0,      0, 0x4425,      0, 0x362F,
+ 0x573A,      0,      0,      0, 0x492B,      0, 0x4346,      0,
+};
+unsigned short utf8_to_euc_E5BD[] = {
+      0, 0x573B,      0,      0,      0,      0,      0,      0,
+ 0x573C,      0, 0x3630,      0, 0x573D,      0, 0x573E,      0,
+      0, 0x5740,      0, 0x4576,      0,      0, 0x5741, 0x5742,
+      0, 0x5743,      0,      0, 0x5734, 0x5733,      0,      0,
+      0, 0x5744, 0x3741,      0,      0,      0, 0x4927,      0,
+      0, 0x3A4C, 0x4937, 0x4426, 0x494B, 0x5745,      0,      0,
+ 0x3E34, 0x3146,      0, 0x5746,      0,      0,      0, 0x5747,
+      0, 0x4C72,      0,      0, 0x4860,      0,      0, 0x574A,
+};
+unsigned short utf8_to_euc_E5BE[] = {
+ 0x317D, 0x402C, 0x5749, 0x5748, 0x3742, 0x4254,      0, 0x574E,
+ 0x574C,      0, 0x574B, 0x4E27, 0x3865,      0,      0,      0,
+ 0x3D79, 0x574D, 0x454C, 0x3D3E,      0,      0,      0, 0x4640,
+ 0x5751, 0x5750,      0,      0,      0,      0, 0x574F,      0,
+ 0x5752, 0x3866,      0,      0,      0,      0,      0,      0,
+ 0x5753, 0x497C, 0x3D5B,      0,      0, 0x5754, 0x4879,      0,
+      0,      0,      0, 0x4641, 0x4427,      0,      0,      0,
+      0, 0x4530,      0,      0, 0x5755, 0x352B,      0,      0,
+};
+unsigned short utf8_to_euc_E5BF[] = {
+      0,      0,      0, 0x3F34,      0, 0x492C,      0,      0,
+      0,      0,      0,      0, 0x3477, 0x4726,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x5756, 0x3B56,
+ 0x4B3A, 0x4B3B,      0,      0, 0x317E, 0x575B,      0,      0,
+ 0x4369,      0,      0,      0, 0x5758,      0,      0,      0,
+      0,      0,      0, 0x3277,      0,      0,      0,      0,
+ 0x582D, 0x575A,      0,      0,      0, 0x4730,      0,      0,
+ 0x5759,      0,      0, 0x5757,      0, 0x397A,      0, 0x575D,
+};
+unsigned short utf8_to_euc_E680[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x5763, 0x5769,
+ 0x5761,      0, 0x455C,      0,      0, 0x5766, 0x495D,      0,
+      0, 0x5760,      0, 0x5765, 0x4E67, 0x3B57,      0,      0,
+ 0x4255, 0x575E,      0,      0,      0, 0x355E, 0x5768, 0x402D,
+ 0x3165, 0x5762, 0x3278, 0x5767,      0,      0,      0, 0x3631,
+      0, 0x5764,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x576A,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E681[] = {
+      0, 0x576C, 0x5776, 0x5774,      0,      0, 0x5771,      0,
+      0,      0, 0x5770, 0x4E78,      0, 0x5772,      0,      0,
+ 0x3632,      0, 0x3931,      0,      0, 0x3D7A,      0,      0,
+      0, 0x5779, 0x576B,      0,      0,      0,      0, 0x576F,
+ 0x575F,      0, 0x327A, 0x5773, 0x5775, 0x4351,      0,      0,
+ 0x3A28, 0x3238, 0x576D, 0x5778, 0x5777, 0x3633,      0, 0x4229,
+ 0x3366,      0,      0,      0,      0, 0x3743,      0, 0x576E,
+      0,      0,      0,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E682[] = {
+      0, 0x577A,      0, 0x577D, 0x5821,      0,      0,      0,
+      0, 0x3C3D,      0, 0x5827, 0x4470, 0x577B,      0,      0,
+      0,      0, 0x5825,      0, 0x3279,      0, 0x5823, 0x5824,
+      0,      0, 0x577E, 0x5822,      0,      0,      0, 0x3867,
+ 0x4D2A,      0,      0, 0x3435,      0,      0, 0x3159, 0x5826,
+      0, 0x473A, 0x302D,      0,      0,      0,      0,      0,
+      0,      0, 0x4861, 0x575C, 0x582C, 0x5830, 0x4C65,      0,
+ 0x5829,      0,      0,      0, 0x4569, 0x582E,      0,      0,
+};
+unsigned short utf8_to_euc_E683[] = {
+      0,      0,      0,      0,      0, 0x3E70, 0x582F, 0x4657,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x4F47,      0, 0x582B,      0,      0,      0,      0,
+ 0x5831,      0, 0x397B,      0, 0x404B,      0,      0, 0x3054,
+ 0x582A, 0x5828,      0, 0x415A,      0,      0,      0, 0x577C,
+ 0x3B34,      0,      0,      0,      0,      0,      0,      0,
+ 0x4246, 0x583D,      0, 0x415B, 0x5838,      0, 0x5835, 0x5836,
+      0, 0x3C66, 0x5839, 0x583C,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E684[] = {
+ 0x5837, 0x3D25,      0, 0x583A,      0,      0, 0x5834,      0,
+ 0x4C7C, 0x4C7B,      0,      0,      0, 0x583E, 0x583F, 0x3055,
+      0,      0,      0,      0,      0, 0x5833,      0,      0,
+      0,      0, 0x3672, 0x3026,      0,      0,      0, 0x3436,
+      0, 0x583B,      0,      0,      0,      0,      0, 0x5843,
+ 0x5842,      0,      0,      0, 0x5847,      0,      0,      0,
+      0,      0,      0,      0, 0x5848,      0,      0,      0,
+      0,      0,      0,      0, 0x5846, 0x5849, 0x5841, 0x5845,
+};
+unsigned short utf8_to_euc_E685[] = {
+      0,      0, 0x584A,      0, 0x584B,      0,      0, 0x5840,
+ 0x3B7C,      0, 0x5844, 0x4256, 0x3932, 0x5832, 0x3F35,      0,
+      0,      0,      0, 0x5858,      0, 0x4A69,      0,      0,
+ 0x584E, 0x584F, 0x5850,      0,      0, 0x5857,      0, 0x5856,
+      0,      0, 0x4B7D, 0x3437,      0, 0x5854,      0, 0x3745,
+ 0x3334,      0,      0, 0x5851,      0,      0, 0x4E38, 0x5853,
+ 0x3056, 0x5855,      0, 0x584C, 0x5852, 0x5859, 0x3744, 0x584D,
+      0,      0,      0,      0,      0,      0, 0x4D5D,      0,
+};
+unsigned short utf8_to_euc_E686[] = {
+      0,      0, 0x4D2B,      0,      0,      0,      0, 0x585C,
+      0,      0, 0x5860,      0,      0,      0, 0x417E,      0,
+ 0x4E79, 0x5861,      0,      0, 0x585E,      0, 0x585B,      0,
+      0, 0x585A, 0x585F,      0,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x4A30,      0,      0, 0x4634,
+      0, 0x3746,      0, 0x5862, 0x585D,      0, 0x5863,      0,
+      0,      0, 0x377B,      0,      0,      0, 0x3231,      0,
+      0,      0, 0x586B,      0,      0,      0, 0x3438,      0,
+};
+unsigned short utf8_to_euc_E687[] = {
+      0,      0,      0, 0x5869,      0,      0, 0x586A, 0x3A29,
+ 0x5868, 0x5866, 0x5865, 0x586C, 0x5864, 0x586E,      0,      0,
+ 0x327B,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0, 0x5870,      0,      0, 0x586F,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x4428,      0, 0x5873,      0, 0x5871, 0x5867,
+ 0x377C,      0, 0x5872,      0, 0x5876, 0x5875, 0x5877, 0x5874,
+};
+unsigned short utf8_to_euc_E688[] = {
+ 0x5878,      0,      0,      0,      0,      0,      0,      0,
+ 0x5879, 0x587A, 0x4A6A,      0, 0x587C, 0x587B, 0x3D3F,      0,
+ 0x402E, 0x3266, 0x327C,      0, 0x587D,      0, 0x303F,      0,
+      0,      0, 0x404C, 0x587E,      0, 0x6C43, 0x5921, 0x3761,
+      0, 0x5922,      0,      0,      0,      0, 0x406F,      0,
+      0,      0, 0x5923,      0,      0,      0, 0x5924, 0x353A,
+ 0x5925,      0, 0x5926, 0x5927, 0x4257,      0,      0,      0,
+ 0x384D,      0,      0, 0x4C61,      0,      0,      0, 0x4B3C,
+};
+unsigned short utf8_to_euc_E689[] = {
+ 0x3D6A, 0x5928,      0,      0,      0,      0,      0, 0x4070,
+ 0x6E3D, 0x4862,      0, 0x3C6A,      0, 0x3A4D, 0x5929,      0,
+      0,      0,      0, 0x4247,      0, 0x4A27,      0,      0,
+ 0x4271,      0,      0, 0x592C,      0,      0, 0x592A,      0,
+ 0x592D,      0,      0, 0x592B,      0,      0,      0,      0,
+ 0x592E,      0,      0,      0,      0,      0, 0x4A31,      0,
+      0, 0x3037,      0,      0,      0,      0, 0x495E,      0,
+      0, 0x4863,      0,      0, 0x592F,      0, 0x5932, 0x3E35,
+};
+unsigned short utf8_to_euc_E68A[] = {
+ 0x353B,      0, 0x5930, 0x5937, 0x3E36,      0,      0,      0,
+      0, 0x5931, 0x4744,      0,      0,      0,      0,      0,
+      0, 0x4D5E, 0x5933, 0x5934, 0x5938, 0x456A, 0x5935, 0x3933,
+ 0x405E,      0,      0, 0x5946, 0x4834,      0, 0x4272,      0,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0,      0, 0x4864, 0x5A2D,      0,      0,      0,
+      0, 0x4A7A,      0,      0,      0, 0x4471,      0,      0,
+      0, 0x4B75,      0, 0x593B, 0x3221, 0x436A,      0,      0,
+};
+unsigned short utf8_to_euc_E68B[] = {
+      0,      0, 0x5944,      0,      0, 0x4334, 0x593E, 0x5945,
+ 0x5940, 0x5947, 0x5943,      0, 0x5942, 0x476F,      0, 0x593C,
+ 0x327D, 0x593A, 0x3571, 0x4273, 0x5936,      0,      0, 0x5939,
+ 0x3934, 0x405B,      0, 0x3E37, 0x5941, 0x4752,      0,      0,
+ 0x3572, 0x3348,      0,      0,      0,      0,      0,      0,
+      0,      0,      0,      0, 0x3367, 0x3F21, 0x5949, 0x594E,
+      0, 0x594A,      0, 0x377D,      0, 0x594F, 0x3B22, 0x3969,
+      0,      0,      0,      0,      0,      0, 0x3D26, 0x593D,
+};
+unsigned short utf8_to_euc_E68C[] = {
+      0, 0x3B7D, 0x594C,      0,      0,      0,      0, 0x3B58,
+ 0x594D, 0x3044,      0,      0, 0x5948,      0,      0,      0,
+      0, 0x4429,      0,      0,      0,      0,      0,      0,
+      0, 0x3573,      0,      0,      0,      0,      0, 0x3634,
+      0,      0,      0,      0,      0,      0,      0, 0x594B,
+ 0x3027,      0,      0, 0x3A43,      0,      0,      0, 0x3F36,
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0,      0, 0x4472,      0,      0, 0x4854, 0x5951, 0x415E,
+};
+unsigned short utf8_to_euc_E68D[] = {
+      0,      0,      0,      0,      0,      0,      0,      0,
+      0, 0x422A,      0,      0, 0x3B2B, 0x5952,      0, 0x5954,
+ 0x5950,      0,      0,      0,      0, 0x4A61,      0, 0x443D,
+      0,      0,      0,      0, 0x415C,      0,      0,      0,
+      0,      0,      0,      0,      0,      0,      0, 0x4A7B,
+ 0x3C4E, 0x5960,      0, 0x595F,      0,      0, 0x3F78,      0,
+      0,      0, 0x377E,      0,      0,      0, 0x5959, 0x3E39,
+      0,      0, 0x4668, 0x4731,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E68E[] = {
+ 0x5957,      0,      0, 0x415D,      0,      0,      0,      0,
+ 0x3C78, 0x595C,      0,      0, 0x3E38,      0, 0x5956, 0x595B,
+      0,      0, 0x4753,      0,      0,      0, 0x5955,      0,
+ 0x3721,      0,      0, 0x335D,      0,      0,      0, 0x595D,
+ 0x4E2B, 0x3A4E, 0x4335, 0x595A,      0, 0x405C,      0, 0x3935,
+ 0x3F64, 0x3166, 0x413C, 0x5958, 0x3545,      0,      0,      0,
+      0,      0, 0x3747,      0, 0x444F, 0x595E,      0,      0,
+      0,      0,      0, 0x415F,      0,      0, 0x5961,      0,
+};
+unsigned short utf8_to_euc_E68F[] = {
+ 0x5963,      0,      0, 0x4237, 0x5969,      0, 0x5964,      0,
+      0, 0x5966,      0,      0,      0,      0,      0, 0x4941,
+ 0x4473,      0, 0x5967,      0,      0,      0, 0x4D2C,      0,
+      0,      0, 0x4D48, 0x3439,      0,      0,      0,      0,
+      0, 0x302E,      0, 0x5965,      0,      0,      0,      0,
+      0, 0x5962,      0,      0,      0,      0, 0x3478,      0,
+      0,      0,      0,      0, 0x3167,      0, 0x5968,      0,
+      0,      0, 0x4D49,      0,      0,      0,      0,      0,
+};
+unsigned short utf8_to_euc_E690[] = {
+      0,      0,      0,      0,      0,      0, 0x596C,      0,
+      0,      0,      0,      0,      0, 0x423B,      0, 0x5973,
+      0,      0,      0, 0x596D,      0,      0, 0x596A, 0x5971,
+      0,      0,      0,      0, 0x5953,      0,      0,      0,
+      0,      0,      0,      0,      0,      0, 0x596E,      0,
+ 0x5972,      0,      0,      0, 0x4842, 0x456B,      0,      0,
+      0,      0,      0,      0, 0x596B,      0, 0x596F,