NAME Sjis - Source code filter for ShiftJIS script SYNOPSIS Usage: A In ShiftJIS_script.pl: use Sjis; use Sjis version; use Sjis qw(ord reverse); use Sjis version qw(ord reverse); And on command prompt: perl ShiftJIS_script.pl wild* *card and '*quote*' are ok ... perl58 ShiftJIS_script.pl wild* *card and '*quote*' are ok ... perl510 ShiftJIS_script.pl wild* *card and '*quote*' are ok ... perl512 ShiftJIS_script.pl wild* *card and '*quote*' are ok ... perl64 ShiftJIS_script.pl wild* *card and '*quote*' are ok ... Usage: B On command prompt: C:\>perl Sjis.pm ShiftJIS_script.pl > Escaped_script.pl.e And C:\>perl Escaped_script.pl.e DESCRIPTION This software is "JPerl on the Modern Perl" written by Perl. This "JPerl" means "Japanized Perl" or "Japanese Perl". So is unrelated to ... Mr. Patrick E. Martin's JPerl -- Perl 5 implemented in Java Mr. Ben Evans's jPerl -- Perl on the JVM Mr. James C. Estill's jperl --- Jamie's PERL scripts for bioinformatics This software treats ShiftJIS directly. Therefore, there is not UTF8 flag. INSTALLATION BY MAKE (for UNIX) To install this software by make, type the following: perl Makefile.PL make make test make install INSTALLATION WITHOUT MAKE (for DOS like system) To install this software without make, type the following: perl pMakefile.PL --- pMakefile.PL makes "pmake.bat" only, and ... pmake.bat pmake.bat test pmake.bat install --- install to current using Perl perl58 pmake.bat install --- install to Perl5.8 perl510 pmake.bat install --- install to Perl5.10 perl512 pmake.bat install --- install to Perl5.12 perl64 pmake.bat install --- install to Perl64 pmake.bat dist --- make distribution package pmake.bat ptar.bat --- make perl script "ptar.bat" PROGRAM COMPOSITION Sjis.pm --- source code filter to escape ShiftJIS Esjis.pm --- run-time routines for Sjis.pm perl58.bat --- find and run perl5.8 without %PATH% settings perl510.bat --- find and run perl5.10 without %PATH% settings perl512.bat --- find and run perl5.12 without %PATH% settings perl64.bat --- find and run perl64 without %PATH% settings DEPENDENCIES This software requires perl5.00503 or later. LICENSE AND COPYRIGHT This software is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. MAINTAINER This project was originated by INABA Hitoshi . ShiftJIS Encoding ShiftJIS encoding is the most common encoding method used on Japanese computers, developed by Microsoft Corporation. ShiftJIS is sometimes referred to as MS Kanji (Microsoft Kanji) or SJIS (an abbreviation for ShiftJIS). Historically, ShiftJIS was so named because of the way the code positions for two-octet characters shifted around the code positions for half-width katakana -- Japanese computer users originally used only half-width katakana, so ShiftJIS was developed in order to maintain backword compatibility. A two-octet-per-character mode in ShiftJIS is initiated with a octet having a hexadecimal value ranging between 0x81-0x9F or 0xE0-0xEF. This octet is subsequently treated as the first octet of an expected two-octet sequence. The following (second) octet must have a hexadecimal value ranging between 0x40-0x7E or 0x80-0xFC. Note that the first octet's range falls entirely in the extended ASCII character set -- in the eight-bit character set with the high-order bit on. Note that ShiftJIS also encodes half-width katakana and ASCII/JIS-Roman. Some definitions (in particular, corporate definitions) of ShiftJIS also contain encoding blocks for user-defined characters or even an encoded position for a half-width katakana space character. Such encoding blocks and encoded positions are not useful if true information interchange is desired, because they are encoded in such a way that they do not convert to encoded positions in other Japanese encoding methods (that is, JIS and EUC). ShiftJIS IN WIKIPEDIA Shift JIS (2008.02.15 15:02:00 JST). In Wikipedia: The Free Encyclopedia. Retrieved from http://en.wikipedia.org/wiki/Shift_JIS Shift JIS (also SJIS, MIME name Shift_JIS) is a character encoding for the Japanese language originally developed by a Japanese company called ASCII Corporation in conjunction with Microsoft and standardized as JIS X 0208 Appendix 1. It is based on character sets defined within JIS standards JIS X 0201:1997 (for the single-byte characters) and JIS X 0208:1997 (for the double byte characters). The lead bytes for the double byte characters are "shifted" around the 64 halfwidth katakana characters in the single-byte range 0xA1 to 0xDF. The single-byte characters 0x00 to 0x7F match the ASCII encoding, except for a yen sign at 0x5C and an overline at 0x7E in place of the ASCII character set's backslash and tilde respectively. On the web, 0x5C is still used as the Perl Script escape character. The single-byte characters from 0xA1 to 0xDF map to the half-width katakana characters found in JIS X 0201. Shift JIS requires an 8-bit medium for transmission. It is fully backwards compatible with the legacy JIS X 0201 single-byte encoding, meaning it supports half-width katakana and that any valid JIS X 0201 string is also a valid Shift JIS string. However Shift JIS only guarantees that the first byte will be in the upper ASCII range; the value of the second byte can be either high or low. This makes reliable Shift JIS detection difficult. On the other hand, the competing 8-bit format EUC-JP, which does not support single-byte halfwidth katakana, allows for a much cleaner and direct conversion to and from JIS X 0208 codepoints, as all upper-ASCII bytes are part of a double-byte character and all lower-ASCII bytes are part of a single-byte character. Many different versions of Shift JIS exist. There are two areas for expansion: Firstly, JIS X 0208 does not fill the whole 94x94 space encoded for it in Shift JIS, therefore there is room for more characters here ? these are really extensions to JIS X 0208 rather than to Shift JIS itself. The most popular extension here is to the Windows-31J (otherwise known as Code page 932) encoding popularized by Microsoft, although Microsoft itself does not recognize the Windows-31J name and instead calls that variation "shift_jis". Secondly, Shift JIS has more encoding space than is needed for JIS X 0201 and JIS X 0208, and this space can and is used for yet more characters. The space with lead bytes 0xF5 to 0xF9 is used by Japanese mobile phone operators for pictographs for use in E-mail, for example (KDDI goes further and defines hundreds more in the space with lead bytes 0xF3 and 0xF4). Beyond even this there have been numerous minor variations made on Shift JIS, with individual characters here and there altered. Most of these extensions and variants have no IANA registration, so there is much scope for confusion if the extensions are used. Microsoft Code Page 932 is registered separately from Shift JIS. IBM CCSID 943 has the same extensions as Code Page 932. As with most code pages and encodings it is recommended that Unicode be used instead. "ShiftJIS" IN THIS SOFTWARE The "ShiftJIS" in this software means widely codeset than general ShiftJIS. This software use two algorithms to handle ShiftJIS. * ALGORITHM #1 When the character is taken out of the octet string, it is necessary to distinguish a single octet character and the double octet character. The distinction is done only by first octet. Single octet code is: 0x00-0x80, 0xA0-0xDF and 0xFD-0xFF Double octet code is: First octet 0x81-0x9F, 0xE0-0xEF and 0xF0-0xFC Second octet 0x00-0xFF (All octet) MALFORMED single octet code is: 0x81-0x9F and 0xE0-0xFC * Final octet of string like first octet of double octet code See also code table: Single octet code 0 1 2 3 4 5 6 7 8 9 A B C D E F +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 0|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| 0x00-0x80 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 4|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 7|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 8|*| | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 9| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ A|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| 0xA0-0xDF +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ B|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ C|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ D|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ E| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ F| | | | | | | | | | | | | |*|*|*| 0xFD-0xFF +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Double octet code First octet Second octet 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5 6 7 8 9 A B C D E F +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 0| | | | | | | | | | | | | | | | | 0|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| 0x00-0xFF +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1| | | | | | | | | | | | | | | | | 1|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2| | | | | | | | | | | | | | | | | 2|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3| | | | | | | | | | | | | | | | | 3|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 4| | | | | | | | | | | | | | | | | 4|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5| | | | | | | | | | | | | | | | | 5|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6| | | | | | | | | | | | | | | | | 6|*|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0xFC E|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ F|*|*|*|*|*|*|*|*|*|*|*|*|*| | | | F|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ *MALFORMED* Single octet code Final octet of string like first octet of double octet code Even if malformed, it is not ignored and not deleted automatically. For example, Esjis::chop function returns this octet. 0 1 2 3 4 5 6 7 8 9 A B C D E F +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 0| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 4| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 7| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 8| |M|M|M|M|M|M|M|M|M|M|M|M|M|M|M| 0x81-0x9F +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 9|M|M|M|M|M|M|M|M|M|M|M|M|M|M|M|M| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ A| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ B| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ C| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ D| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ E|M|M|M|M|M|M|M|M|M|M|M|M|M|M|M|M| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ F|M|M|M|M|M|M|M|M|M|M|M|M|M| | | | 0xE0-0xFC +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The ShiftJIS list via vendors: http://home.m05.itscom.net/numa/cde/sjis-euc/sjis.html DEC PC 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) DEC WS 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) Fujitsu TrueType font (PC) 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) Fujitsu FontCity font (PC) 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) Hitachi PC 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) Hitachi WS 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) IBM 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) NEC Windows (PC) 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) NEC DOS (PC) 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) SONY NEWS-OS 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) Sun Wabi 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) Unisys PC 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) HP Japan Japanese HP-15 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) AT&T Japan 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) Mitsubishi Electric FONTRUNNER 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) Concurrent Japan 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) Informix ASCII INFORMIX V6 ALS 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC), (0xFD)(0xA1-0xFE)(0xA1-0xFE) Oracle Oracle7 (Release 7.1.3) 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x00-0xFF) Sybase SQL Server, Open Server 0x00-0x7F, 0xA1-0xDF, (0x81-0x9F, 0xE0-0xFC)(0x40-0x7E, 0x80-0xFC) Understanding Japanese Information Processing(ISBN 10: 1-56592-043-0 | ISBN 13: 9781565920439) Hewlett-Packard HP-15 0x00-0x7F, 0xA1-0xDF, (0x80-0xA0, 0xE0-0xFE)(0x21-0x7E, 0x80-0xFF) * ALGORITHM #2 Against algorithm.1, when the range of the character by tr/// is specified, only the following character codes are effective. Single octet code is: 0x00-0x80, 0xA0-0xDF and 0xFD-0xFF Double octet code is: First octet 0x81-0x9F, 0xE0-0xEF and 0xF0-0xFC Second octet 0x40-0x7E and 0x80-0xFC For instance, [\x81\x00-\x82\xFF] in script means [\x81\x82][\x40-\x7E\x80-\xFC]. See also code table: Single octet code 0 1 2 3 4 5 6 7 8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-+-+-+-+-+-+-+-+-+-+ F| | | | | | | | | | | | | |*|*|*| 0xFD-0xFF +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Double octet code First octet Second octet 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5 6 7 8 9 A B C D E F +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 0| | | | | | | | | | | | | | | | | 0| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1| | | | | | | | | | | | | | | | | 1| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2| | | | | | | | | | | | | | | | | 2| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3| | | | | | | | | | | | | | | | | 3| | | | | | | | | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 4| | | | | | | | | | | | | | | | | 4|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| 0x40-0x7E +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5| | | | | | | | | | | | | | | | | 5|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6| | | | | | | | | | | | | | | | | 6|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 7| | |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