ShiftJIS::X0213::MapUTF::Supplements - Supplemental Mapping from Unicode to Shift_JISX0213
use ShiftJIS::X0213::MapUTF; use ShiftJIS::X0213::MapUTF::Supplements; $sjis_str = utf8_to_sjis2004 (\&to_sjis2004_supplements, $utf8_str); $sjis_str = utf16_to_sjis2004 (\&to_sjis2004_supplements, $utf16_str); $sjis_str = utf16le_to_sjis2004(\&to_sjis2004_supplements, $utf16le_str); $sjis_str = utf16be_to_sjis2004(\&to_sjis2004_supplements, $utf16be_str); $sjis_str = utf32_to_sjis2004 (\&to_sjis2004_supplements, $utf32_str); $sjis_str = utf32le_to_sjis2004(\&to_sjis2004_supplements, $utf32le_str); $sjis_str = utf32be_to_sjis2004(\&to_sjis2004_supplements, $utf32be_str); $sjis_str = unicode_to_sjis2004(\&to_sjis2004_supplements, $unicode_str); $sjis_str = utf8_to_sjis0213 (\&to_sjis0213_supplements, $utf8_str); $sjis_str = utf16_to_sjis0213 (\&to_sjis0213_supplements, $utf16_str); $sjis_str = utf16le_to_sjis0213(\&to_sjis0213_supplements, $utf16le_str); $sjis_str = utf16be_to_sjis0213(\&to_sjis0213_supplements, $utf16be_str); $sjis_str = utf32_to_sjis0213 (\&to_sjis0213_supplements, $utf32_str); $sjis_str = utf32le_to_sjis0213(\&to_sjis0213_supplements, $utf32le_str); $sjis_str = utf32be_to_sjis0213(\&to_sjis0213_supplements, $utf32be_str); $sjis_str = unicode_to_sjis0213(\&to_sjis0213_supplements, $unicode_str);
This module provides some supplemental mappings (fallbacks) from Unicode to Shift_JISX0213, via a coderef.
$sjis2004_char = to_sjis2004_supplements($unicode_codepoint)
$sjis0213_char = to_sjis0213_supplements($unicode_codepoint)
Returns a SJIS character (as a string) for some Unicode codepoints unmapped to SJIS. Otherwise returns a null string.
NOTE: to_sjis0213_supplements is just an alias for to_sjis2004_supplements, then their mappings has no difference.
to_sjis0213_supplements
to_sjis2004_supplements
E.g. to_sjis2004_supplements(0x9B1D) returns "\xFC\x5A"; to_sjis2004_supplements(0x00B5) returns "\x83\xCA"; to_sjis0213_supplements(0x9B1C) returns "\xFC\x5A"; to_sjis0213_supplements(0x00B5) returns "\x83\xCA".
to_sjis2004_supplements(0x9B1D)
"\xFC\x5A"
to_sjis2004_supplements(0x00B5)
"\x83\xCA"
to_sjis0213_supplements(0x9B1C)
to_sjis0213_supplements(0x00B5)
This module is an experimental release. Propriety of mapping is not guaranteed. Any of these supplemental mappings may be added, modified, or removed in future.
SADAHIRO Tomoyuki <SADAHIRO@cpan.org>
Copyright(C) 2002-2005, SADAHIRO Tomoyuki. Japan. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install ShiftJIS::X0213::MapUTF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ShiftJIS::X0213::MapUTF
CPAN shell
perl -MCPAN -e shell install ShiftJIS::X0213::MapUTF
For more information on module installation, please visit the detailed CPAN module installation guide.