# From JIS
-print "JIS to JIS ... ";&test("$nkf ",$example{'jis'},$example{'jis'});
+print "JIS to JIS ... ";&test("$nkf -j",$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 EUC
-print "EUC to JIS ... ";&test("$nkf ",$example{'euc'},$example{'jis'});
+print "EUC to JIS ... ";&test("$nkf -j",$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 JIS ... ";&test("$nkf -j",$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 JIS ... ";&test("$nkf -j",$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 EUC
-print "EUC to JIS ... ";&test("$nkf ",$example{'euc1'},$example{'jis1'});
+print "EUC to JIS ... ";&test("$nkf -j",$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 JIS ... ";&test("$nkf -j",$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'});
eofeof
print "Ambiguous Case. ";
- &test("$nkf",$example{'amb'},$example{'amb.euc'});
+ &test("$nkf -j",$example{'amb'},$example{'amb.euc'});
# Input assumption
print "SJIS Input assumption ";
- &test("$nkf -Sx",$example{'amb'},$example{'amb.sjis'});
+ &test("$nkf -jSx",$example{'amb'},$example{'amb.sjis'});
# Broken JIS
# -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'});
+ &test("$nkf -jXZ",$example{'x0201.sjis'},$example{'x0201.x0208'});
print "X0201 conversion: JIS ";
- &test("$nkf -Z",$example{'x0201.jis'},$example{'x0201.x0208'});
+ &test("$nkf -jZ",$example{'x0201.jis'},$example{'x0201.x0208'});
print "X0201 conversion:SI/SO ";
- &test("$nkf -Z",$example{'x0201.sosi'},$example{'x0201.x0208'});
+ &test("$nkf -jZ",$example{'x0201.sosi'},$example{'x0201.x0208'});
print "X0201 conversion: EUC ";
- &test("$nkf -Z",$example{'x0201.euc'},$example{'x0201.x0208'});
+ &test("$nkf -jZ",$example{'x0201.euc'},$example{'x0201.x0208'});
print "X0201 conversion: UTF8 ";
- &test("$nkf -Z",$example{'x0201.utf'},$example{'x0201.x0208'});
+ &test("$nkf -jZ",$example{'x0201.utf'},$example{'x0201.x0208'});
# -x means X0201 output
print "X0201 output: SJIS ";
&test("$nkf -xs",$example{'x0201.euc'},$example{'x0201.sjis'});
# print "Next test is expected to Fail.\n";
print "MIME decode (strict) ";
- $tmp = &test("$nkf -mS",$example{'mime.iso2022'},$example{'mime.ans.strict'});
+ $tmp = &test("$nkf -jmS",$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
eofeof
print "MIME decode (nonstrict)";
- $tmp = &test("$nkf -mN",$example{'mime.iso2022'},$example{'mime.ans'},$example{'mime.ans.alt'});
+ $tmp = &test("$nkf -jmN",$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'});
+ $tmp = &test("$nkf -jmNu",$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'});
+ &test("$nkf -jTmB",$example{'mime.base64'},$example{'mime.base64.ans'});
# MIME ISO-8859-1
eofeof
print "test_data/cr ";
- &test("$nkf -d",$example{'test_data/cr'},$example{'test_data/cr.ans'});
+ &test("$nkf -jd",$example{'test_data/cr'},$example{'test_data/cr.ans'});
# test_data/fixed-qencode
$example{'test_data/fixed-qencode'} = unpack('u',<<'eofeof');
eofeof
print "test_data/fixed-qencode ";
- &test("$nkf -mQ",$example{'test_data/fixed-qencode'},$example{'test_data/fixed-qencode.ans'});
+ &test("$nkf -jmQ",$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');
eofeof
print "test_data/long-fold-1 ";
- &test("$nkf -F60",$example{'test_data/long-fold-1'},$example{'test_data/long-fold-1.ans'});
+ &test("$nkf -jTF60",$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');
eofeof
print "test_data/long-fold ";
- &test("$nkf -f60",$example{'test_data/long-fold'},$example{'test_data/long-fold.ans'});
+ &test("$nkf -jTf60",$example{'test_data/long-fold'},$example{'test_data/long-fold.ans'});
# test_data/mime_out
$example{'test_data/mime_out'} = unpack('u',<<'eofeof');
eofeof
print "test_data/mime_out ";
- &test("$nkf -M",$example{'test_data/mime_out'},$example{'test_data/mime_out.ans'});
+ &test("$nkf -jM",$example{'test_data/mime_out'},$example{'test_data/mime_out.ans'});
# test_data/multi-line
$example{'test_data/multi-line'} = unpack('u',<<'eofeof');
eofeof
print "test_data/non-strict-mime ";
- &test("$nkf -mN",$example{'test_data/non-strict-mime'},$example{'test_data/non-strict-mime.ans'});
+ &test("$nkf -jTmN",$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');
eofeof
print "test_data/q-encode-softrap ";
- &test("$nkf -mQ",$example{'test_data/q-encode-softrap'},$example{'test_data/q-encode-softrap.ans'});
+ &test("$nkf -jTmQ",$example{'test_data/q-encode-softrap'},$example{'test_data/q-encode-softrap.ans'});
# test_data/rot13
$example{'test_data/rot13'} = unpack('u',<<'eofeof');
eofeof
print "test_data/rot13 ";
- &test("$nkf -r",$example{'test_data/rot13'},$example{'test_data/rot13.ans'});
+ &test("$nkf -jr",$example{'test_data/rot13'},$example{'test_data/rot13.ans'});
# test_data/slash
$example{'test_data/slash'} = unpack('u',<<'eofeof');