|
|
OverviewConvert Japanese characters.
Flow
Sample codeuse Jcode; my $string = "日本語文字列"; print jcode($string)->utf8;
Description of the codeuse Jcode; Load Jcode. my $string = "日本語文字列"; $string containts Japanese characters. This characters will be converted to any other Japanese code such as Shift_JIS, EUC-JP, JIS or UTF-8. print jcode($string)->utf8; In this example, $string is converted to utf8. To convert Shift_JIS, EUC-JP, ISO-20022-JP(JIS), the following methods are used respectively. jcode($string)->sjis; jcode($string)->euc; jcode($string)->jis; Just to convert without displaying, my $new_string = jcode($string)->utf8; it can be done as above. |