Unicode::Escape

Unicode::Escape is a Perl module with escape and unescape Unicode characters other than ASCII.
Download

Unicode::Escape Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Hitoshi Amano
  • Publisher web site:
  • http://search.cpan.org/~itwarrior/Unicode-Escape-0.0.2/lib/Unicode/Escape.pm

Unicode::Escape Tags


Unicode::Escape Description

Unicode::Escape is a Perl module with escape and unescape Unicode characters other than ASCII. Unicode::Escape is a Perl module with escape and unescape Unicode characters other than ASCII.SYNOPSIS # Escape Unicode charactors like '\u3042\u3043\u3044'. # JSON thinks No more Garble!! # case 1 use Unicode::Escape; my $escaped1 = Unicode::Escape::escape($str1, 'euc-jp'); # $str1 contains charactor that is not ASCII. $str1 is encoded by euc-jp. my $escaped2 = Unicode::Escape::escape($str2); # default is utf8 # $str2 contains charactor that is not ASCII. my $unescaped1 = Unicode::Escape::unescape($str3, 'shiftjis'); # $str3 contains escaped Unicode character. return value is encoded by shiftjis. my $unescaped2 = Unicode::Escape::unescape($str4); # default is utf8 # $str4 contains escaped Unicode character. # case 2 use Unicode::Escape qw(escape unescape); my $escaped1 = escape($str1, 'euc-jp'); # $str1 contains charactor that is not ASCII. $str1 is encoded by euc-jp. my $escaped2 = escape($str2); # default is utf8 # $str2 contains charactor that is not ASCII. my $unescaped1 = unescape($str3, 'shiftjis'); # $str3 contains escaped Unicode character. return value is encoded by shiftjis. my $unescaped2 = unescape($str4); # default is utf8 # $str4 contains escaped Unicode character. # case 3 use Unicode::Escape; my $escaper = Unicode::Escape->new($str, 'shiftjis'); # $str contains charactor that is not ASCII. $str is encoded by shiftjis.(default is utf8) my $escaped = $escaper->escape; # case 4 use Unicode::Escape; my $escaper = Unicode::Escape->new($str); # $str contains escaped Unicode character. my $unescaped1 = $escaper->unescape('shiftjis'); my $unescaped2 = $escaper->unescape; # default is utf8.Escape and unescape Unicode characters other than ASCII. When the server response is javascript code, it is convenient. Requirements: · Perl


Unicode::Escape Related Software