2004/07/23 (é) 16:21 ã PHPDiscuss - PHP Newsgroups and mailing lists
ãããæãããã:
> 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).

I guess PHP thinks the code is in EUC because you're telling it in the
config that it's in EUC with the following line.

;; Set internal encoding to EUC-JP
> mbstring.internal_encoding = EUC-JP  

In the long run, I think you'd be better off to do your scripts in EUC,
but if you want them in SJIS then you should set the internal encoding
to SJIS. IIRC, there's also a config setting for
mbstring.script_encoding which you'd also want to set to SJIS.

There's more info on this in the docs. 

Hope that helps,
-dave


>   
> 
> 
> 
> 
> >From searching around online, it would appear that it is possible to
> convert the 
> Shift_JIS code into EUC code by the following settings:
> 
> ;; Enable Output Buffering
> output_buffering     = On
> 
> ;; Set mb_output_handler to enable output conversion
> output_handler       = mb_output_handler
> 
> ;; Set HTTP header charset
> default_charset      = Shift_JIS
> 
> ;; Set default language to Japanese
> mbstring.language = Japanese
> 
> ;; Set http input encoding conversion to auto
> mbstring.http_input  = auto 
> 

> ;; Do not print invalid characters
> mbstring.substitute_character = none
> 
> 
> However, it does not work. Any suggestions would be GREATLY appreciated....

-- 
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to