Re: mb_send_mail() does not send UTF-8 encoded messages properly

From: Date: Thu, 07 Dec 2006 13:35:53 +0000
Subject: Re: mb_send_mail() does not send UTF-8 encoded messages properly
References: 1  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-1032@lists.php.net to get a copy of this message
Anastas Giokov <agiokov <at> gmail.com> writes: > > I am trying to send UTF-8 encoded e-mail message with mail() function, > overloaded by mb_send_mail(). The following message is recorded in error > log: > > PHP Warning: mb_send_mail() [<a > href='function.mb-send-mail'>function.mb-send-mail</a>]: Unsupported > charset &quot;&quot;utf-8&quot;&quot; - will be regarded as ascii in {file} > > The message is sent ASCII encoded and is garbled. > > mb_language returns 'neutral' as it should be for UTF-8. > > I'm using PHP 5.1.6 / Apache 2.2.3 on Debian testing. > > Anastas > Hi, I have the exact same problem. The php sources throwing this error is (from http://php5.sourcesdb.com/r.php?num=1960) if (_tran_cs == mbfl_no_encoding_invalid) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unsupported charset \"%s\" - will be regarded as ascii", charset); _tran_cs = mbfl_no_encoding_ascii; } It seems that the mb_string-extension does not strip away the quotations on "utf-8". Then, since "\"utf-8\"" != "utf-8" the script endocing is not considered valid. But I cannot see where it gets the idea from that the chosen encoding is "utf-8" with quotation marks... In php.in all I've got is mbstring.internal_encoding = UTF-8 (without quation as one can see) Do you have any new light to shed over the subject? Cheers, Fredrik

« previous php.i18n (#1032) next »