The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

ShiftJIS::X0213::MapUTF::Supplements - Supplemental Mapping from Unicode to Shift_JISX0213

SYNOPSIS

  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);

DESCRIPTION

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.

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".

DISCLAIMER

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.

AUTHOR

SADAHIRO Tomoyuki <SADAHIRO@cpan.org>

  Copyright(C) 2002-2007, 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.

SEE ALSO

ShiftJIS::X0213::MapUTF