PHP/ʸ»ú¥³¡¼¥É
ʸ»ú¥³¡¼¥ÉÀßÄê¤òɽ¼¨
print_r(mb_get_info("all"));
ɽ¼¨Îã
[internal_encoding] => UTF-8 [http_input] => [http_output] => SJIS-win [func_overload] => 0 [func_overload_list] => no overload [mail_charset] => ISO-2022-JP [mail_header_encoding] => BASE64 [mail_body_encoding] => 7bit [illegal_chars] => 0 [encoding_translation] => Off [language] => Japanese [detect_order] => Array ( [0] => ASCII [1] => JIS [2] => UTF-8 [3] => EUC-JP [4] => SJIS ) [substitute_character] => none [strict_detection] => Off
¥¹¥¯¥ê¥×¥ÈÆâ¤Ç¤Îʸ»ú¥³¡¼¥ÉÀßÄê
#pre{{
mb_language('Japanese');
ini_set('mbstring.detect_order', 'auto');
ini_set('mbstring.encoding_translation', 0);
ini_set('mbstring.http_input', 'pass');
ini_set('mbstring.http_output', 'pass');
ini_set('mbstring.internal_encoding', 'UTF-8');
ini_set('mbstring.script_encoding', 'UTF-8');
ini_set('mbstring.substitute_character', 'none');
if (isset($_GET)) {
mb_convert_variables(mb_internal_encoding(), mb_http_input(), $_GET);
}
if (isset($_POST)) {
mb_convert_variables(mb_internal_encoding(), mb_http_input(), $_POST);
}
}}
¥Í¥¿¸µ¤«¤é¤¯¤ê²°¤Î¥Ö¥í¥°
UTF-8¤Çºî¤Ã¤¿¥Ú¡¼¥¸¤òShift-JIS¤Ç½ÐÎϤ¹¤ëÊýË¡
#pre{{
<?php
header('Content-Type: text/html; charset=Shift_JIS');
ob_start();
?>
¤³¤³¤ËShift-JIS¤Ç½ÐÎϤ·¤¿¤¤ÆâÍƤòUTF-8¤Çµ½Ò¡£
<?php
$output = ob_get_contents();
ob_end_clean();
echo mb_convert_encoding($output, "SJIS", "UTF-8");
?>
}}
¥Í¥¿¸µIDEA*IDEA
mb_send_mail¤ò»È¤ï¤ºPEAR::Mail¤ÇSMTPÁ÷¿®¤¹¤ë
mb_send_mail¤ÇÍøÍѤµ¤ì¤ëʸ»ú¥³¡¼¥É¤Ïlanguage¥Ñ¥é¥á¡¼¥¿¤Ë°Í¸¤·¡¢language¤ËJapanese¤È»ØÄꤷ¤Æ¤âISO-2202-JP¡¢UTF-8¡¢SJIS¤ÇÁ÷¤ë¤Î¤«Á´¤¯ÉÔÌÀ¤Î¤¿¤á¡£ ¤½¤ì¤Ë¥Þ¥ë¥Á¥Ñ¡¼¥È¥á¡¼¥ë¤Î¾ì¹ç¤Ïʸ»ú¥³¡¼¥É¤¬°ìΧ¤Ç¤Ê¤¤¤³¤È¤¬¤¢¤ê¡¢Î㤨¤Ðdocomo¤Î¥Ç¥³¥á¡¼¥ë¤Ï¥Æ¥¥¹¥ÈÉôʬ¤ÏJIS¤À¤¬HTMLÉôʬ¤ÏSJIS¤È¤Ê¤ê¤Þ¤¹¡£
¥Í¥¿¸µ£Ð£È£Ð¤Îʸ»ú²½¤±¤òËܵ¤¤Ç²ò·è¤¹¤ë ¤®¤¸¤å¤Ã¤ä¤µ¤ó