|
|
OverviewMIME encode mail header so that Japanese characters correctly displayed. This method can be used for mail subject and address where Japanese is used.
Flow
A sample codeuse Jcode; my $string = "日本語文字列"; my $encoded_string = jcode($string)->mime_encode;
Description of the codeuse Jcode; Load Jcode. my $string = "日本語文字列"; $string containts Japanese characters. Obtain the code of this Japanese characters. my $encoded_string = jcode($string)->mime_encode; Perform a MIME encode using mime_encode method of Jcode. This allows to include Japanese characters into mail header without breaking Japanese characters. Performing MIME encode of ``日本語文字列'' results the following output. =?ISO-2022-JP?B?GyRCRnxLXDhsSjg7ek5zGyhC?= |