Re: Bakemoji in From header line for Japanese e-mail sent with PHP mb_send_mail
Moriyoshi Koizumi <[email protected]>
| Newsgroups | gmane.comp.php.internationalization |
|---|---|
| Message-ID | <[email protected]> |
Perhaps you haven't just set mbstring.language to "Japanese" in your php.ini. Pass strings encoded in the same encoding as specified in mbstring.internal_encoding to mb_send_mail(). Basically no additional preparation should be needed. HTH, Moriyoshi On 2004/10/19, at 22:01, WillaDee Young wrote: > I'm trying send Japanese e-mail from a PHP web site. I am using > mb_send_mail for this task. The back end is MySQL and the whole system > is set up to use EUC-JP internally and SJIS for output. I have a form > prepopulated with some suggested Japanese text, the user edits that, > and the mail is sent. > > The form fields are (1) e-mail subject, (2) sender name, (3) sender > e-mail address, and (4) message body. The sender name is concatenated > with an angle-bracketed version of the sender e-mail address > (separated by a hankaku space) and used as the e-mail From field. The > subject is used as the subject and the message body is the message > body. > > No problems with the subject and the message body. The sender (the > From line) however is bakemoji. I tried using mb_convert_encoding and > converting to ISO-2022-JP and got very weird results, almost all of > the kanji went through okay, but the number of characters were > increased and the extra characters were bakemoji. > > Shouldn't mb_send_mail just be taking care of everything, or do I need > to be doing something to prepare text for it? Is there a problem with > concatenating the kanji name and the ASCII email address? Is there any > way the kanji name could be in a different encoding than the subject > and message body, even though it comes from the same form? How can I > troubleshoot this? If the From line is bakemoji, is there a risk that > the Subject and message body will be bakemoji in some mail readers? > > Any help appreciated. > > -- > PHP Internationalization Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Internationalization Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php