ShiftJIS-CP932-MapUTF

 view release on metacpan or  search on metacpan

MapUTF.pod  view on Meta::CPAN


Converts Unicode to CP-932.

This B<Unicode> is coded in the Perl's internal format (see F<perlunicode>).
If not flagged with C<SVf_UTF8>, upgraded as an ISO 8859-1 (latin1) string.

B<This function is provided only for Perl 5.6.1 or later, and via XS.>

=item C<utf16_to_cp932([UNICODE_CALLBACK,] STRING [, UNICODE_OPTION])>

Converts UTF-16 (with or w/o C<BOM>) to CP-932.

=item C<utf16le_to_cp932([UNICODE_CALLBACK,] STRING [, UNICODE_OPTION])>

Converts UTF-16LE to CP-932.

=item C<utf16be_to_cp932([UNICODE_CALLBACK,] STRING [, UNICODE_OPTION])>

Converts UTF-16BE to CP-932.

=item C<utf32_to_cp932([UNICODE_CALLBACK,] STRING [, UNICODE_OPTION])>

Converts UTF-32 (with or w/o C<BOM>) to CP-932.

=item C<utf32le_to_cp932([UNICODE_CALLBACK,] STRING [, UNICODE_OPTION])>

Converts UTF-32LE to CP-932.

=item C<utf32be_to_cp932([UNICODE_CALLBACK,] STRING [, UNICODE_OPTION])>

Converts UTF-32BE to CP-932.

=back

MapUTF.pod  view on Meta::CPAN

B<On request:>

    cp932_to_utf32le  utf32le_to_cp932
    cp932_to_utf32be  utf32be_to_cp932
                      utf16_to_cp932 [*]
                      utf32_to_cp932 [*]

[*] Their counterparts C<cp932_to_utf16()> and C<cp932_to_utf32()>
are not implemented yet. They need more investigation
on return values from C<SJIS_CALLBACK>...
(concatenation needs recognition of and coping with C<BOM>)

=head1 CAVEAT

Pure Perl edition of this module doesn't understand
any logically wide characters (see F<perlunicode>).
Use C<utf8::decode>/C<utf8::encode> (see F<utf8>) on Perl 5.7 or later
if necessary.

=head1 AUTHOR

MapUTF.xs  view on Meta::CPAN

    app_in_utf32be,
};

static UV (*ord_uv_in[])(U8 *, STRLEN, STRLEN *) = {
    NULL,
    ord_in_utf8,
    ord_in_utf16le,
    ord_in_utf16be,
    ord_in_utf32le,
    ord_in_utf32be,
    ord_in_utf16be, /* w/o BOM*/
    ord_in_utf32be, /* w/o BOM*/
};


MODULE = ShiftJIS::CP932::MapUTF	PACKAGE = ShiftJIS::CP932::MapUTF

PROTOTYPES: DISABLE

void
cp932_to_unicode(...)
  ALIAS:

MapUTF/Japanese.pod  view on Meta::CPAN

Unicode ‚ð CP-932 ‚ɕϊ·‚µ‚Ü‚·B

‚±‚Ì B<Unicode> ‚́APerl ‚Ì“à•”Œ`Ž®iF<perlunicode> ŽQÆjB
C<SVf_UTF8> ƒtƒ‰ƒO•t‚«‚łȂ¢ê‡AISO 8859-1 (latin1) •¶Žš—ñ‚Æ‚µ‚Ä
Unicode ‚É upgrade ‚³‚ê‚Ü‚·B

B<‚±‚̊֐”‚Í Perl 5.6.1 ˆÈ~A‚©‚ XS ”łł̂ݒñ‹Ÿ‚³‚ê‚Ü‚·B>

=item C<utf16_to_cp932([UNICODE_CALLBACK,] STRING [, UNICODE_OPTION])>

UTF-16 (C<BOM> •t‚«‚Ü‚½‚Í–³‚µ) ‚ð CP-932 ‚ɕϊ·‚µ‚Ü‚·B

=item C<utf16le_to_cp932([UNICODE_CALLBACK,] STRING [, UNICODE_OPTION])>

UTF-16LE ‚ð CP-932 ‚ɕϊ·‚µ‚Ü‚·B

=item C<utf16be_to_cp932([UNICODE_CALLBACK,] STRING [, UNICODE_OPTION])>

UTF-16BE ‚ð CP-932 ‚ɕϊ·‚µ‚Ü‚·B

=item C<utf32_to_cp932([UNICODE_CALLBACK,] STRING [, UNICODE_OPTION])>

UTF-32 (C<BOM> •t‚«‚Ü‚½‚Í–³‚µ) ‚ð CP-932 ‚ɕϊ·‚µ‚Ü‚·B

=item C<utf32le_to_cp932([UNICODE_CALLBACK,] STRING [, UNICODE_OPTION])>

UTF-32LE ‚ð CP-932 ‚ɕϊ·‚µ‚Ü‚·B

=item C<utf32be_to_cp932([UNICODE_CALLBACK,] STRING [, UNICODE_OPTION])>

UTF-32BE ‚ð CP-932 ‚ɕϊ·‚µ‚Ü‚·B

=back

MapUTF/Japanese.pod  view on Meta::CPAN

B<—v‹‚³‚ê‚ê‚Î:>

    cp932_to_utf32le  utf32le_to_cp932
    cp932_to_utf32be  utf32be_to_cp932
                      utf16_to_cp932 [*]
                      utf32_to_cp932 [*]

[*] ‚±‚ê‚ç‚Æ‘Ήž‚·‚ׂ« C<cp932_to_utf16()> ‚¨‚æ‚Ñ C<cp932_to_utf32()>
‚Í–¢ŽÀ‘•‚Å‚·B‚Ü‚¾ C<SJIS_CALLBACK> ‚̕Ԃè’l‚ɂ‚¢‚Ä‚à‚¤­‚µŒŸ“¢‚ª
•K—v‚ƍl‚¦‚Ä‚¢‚Ü‚·B
i•¶Žš—ñ‚̘AŒ‹‚É C<BOM> ‚Ì”Fޝ‚Əˆ—‚ª•K—v‚ƂȂé‚Å‚µ‚傤Bj

=head1 ’ˆÓŽ–€

‚±‚̃‚ƒWƒ…[ƒ‹‚Ì Pure Perl ”ł̓ƒCƒh•¶ŽšiF<perlunicode> ‚ðŽQÆj‚ð
—‰ð‚Å‚«‚Ü‚¹‚ñB•K—v‚È‚çAPerl 5.7 ˆÈ~‚Ì
C<utf8::decode>/C<utf8::encode>iF<utf8> ‚ðŽQÆj‚ðŽg‚Á‚Ä‚­‚¾‚³‚¢B

=head1 ìŽÒ

SADAHIRO Tomoyuki <SADAHIRO@cpan.org> i’åœA ’msj



( run in 0.420 second using v1.01-cache-2.11-cpan-131fc08a04b )