Re: Problem with Shift_JIS script encoding

From: Date: Sat, 24 Jul 2004 06:25:09 +0000
Subject: Re: Problem with Shift_JIS script encoding
References: 1  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-739@lists.php.net to get a copy of this message
PHPDiscuss - PHP Newsgroups and mailing lists wrote:
I've been having a lot of trouble since upgrading over PHP4.3.1. Here's the problem: 1. My scripts are all written in Shift_JIS 2. When I try to send mail using the mb_send_mail function, the messages written in my scripts in Shift_JIS are not properly encoded (it appears that PHP thinks that the code is in EUC and is making an incorrect conversion) That's because you set mbstring.internal_encoding to EUC-JP.
mbstring.internal_encoding = EUC-JP     
Setting it to Shift_JIS will do the trick, while writing scripts in Shift_JIS is discouraged.
If you really want to do so, It'd be better to use the zend-multibyte feature. Specify --enable-zend-multibyte to configure at build time and setting mbstring.script_encoding to Shift_JIS in your php.ini. HTH, Moriyoshi

« previous php.i18n (#739) next »