<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>PHP mail() and charset encoding question, part2 - mbstring</title>
<link>http://blog.roodo.com/rocksaying/archives/2998451.html/</link>
<description><![CDATA[php mail mbstring

在 part1 中提到 mail() 會固定對信件內容進行編碼，而解決之道是改用 PHPMailer, PEAR::Mail 寄送信件。而本文則要繼續探索 mail() 對信件內容編碼之原因。

]]>
	</description>
<language>zh-tw</language>
<generator>Roodo Blog System</generator>
<copyright>All Rights Reserved</copyright>
<atom:link href="http://blog.roodo.com/rocksaying/archives/2998451-comment.xml" rel="self" type="application/rss+xml" />
<item>
	<title>回應：PHP mail() and charset encoding question, part2 - mbstring</title>
	<description><![CDATA[你有試著用 php -m 列出 PHP 編入的 extension 有哪些嗎？如果你的 php 是將 mbstring 直接編譯在一起的話，就會作用。這時不理會 php.ini 中的設定。]]>
	</description>
	<link>http://blog.roodo.com/rocksaying/archives/2998451.html</link>
	<guid>http://blog.roodo.com/rocksaying/archives/2998451.html#comment-17888179</guid>
		<category>文章回應</category>
	<pubDate>Thu, 06 Nov 2008 02:36:16 +0800</pubDate>
</item>
<item>
	<title>回應：PHP mail() and charset encoding question, part2 - mbstring</title>
	<description><![CDATA[只要不載入 mbstring extension 或是在 php.ini 中設定 mbstring.func_overload = 6(not overload mail())
-----------------------------
當我在php.ini下查看。
發現這個本來就沒有載入了
(;mbstring extension =0 )
仍然呈現亂碼。
似乎~並不是出自於這裡的問題]]>
	</description>
	<link>http://blog.roodo.com/rocksaying/archives/2998451.html</link>
	<guid>http://blog.roodo.com/rocksaying/archives/2998451.html#comment-17799331</guid>
	<author>bovaho2000@yahoo.com.tw(我熊)</author>	<category>文章回應</category>
	<pubDate>Fri, 24 Oct 2008 12:24:50 +0800</pubDate>
</item>
<item>
	<title>回應：PHP mail() and charset encoding question, part2 - mbstring</title>
	<description><![CDATA[你應該先確認你想讀入的那些文件，其內容都是 utf-8 的。

此外，從程式碼來看，既然你已經完全處理掉了 charset 的編碼動作，那麼你應避免調用 mb_send_mail() ，多一個轉接多一隻鬼。你應該選擇用 <a href="http://blog.roodo.com/rocksaying/archives/2950655.html">PHP mail() and charset encoding question, part 1</a> 的方式送信。]]>
	</description>
	<link>http://blog.roodo.com/rocksaying/archives/2998451.html</link>
	<guid>http://blog.roodo.com/rocksaying/archives/2998451.html#comment-16262449</guid>
		<category>文章回應</category>
	<pubDate>Mon, 21 Apr 2008 14:01:41 +0800</pubDate>
</item>
<item>
	<title>回應：PHP mail() and charset encoding question, part2 - mbstring</title>
	<description><![CDATA[請問一下當我用像下面的程式去跑的時侯為什麼在信件的本文的部份常會莫名的跑出!或亂碼...本文部份是讀入utf8格式的中文字..是那個部份 下錯 了嗎 ??謝 謝 
$subj='=?utf-8?B?' . base64_encode("中文測試").'?=';
$to = 'melu@yahoo.com';
$from = '英文';
$mime = md5(uniqid(mt_rand(),TRUE));

$header = "From:=?utf-8?B?".base64_encode($from)."?=\r\n";
$header .= "MIME-Version:1.0\r\n";
$header .= "Content-Type: multipart/alternative;boundary=".$mime."\r\n";
$header .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
$msg="";
$msg .= "--".$mime."\r\n";
$msg .= "Content-Type: text/plain; charset=UTF-8\n";
$msg .= "Content-Transfer-Encoding: 8bit\n\n";
$msg .= "--".$mime."\r\n";
$msg .= "Content-Type: text/html; charset=UTF-8\n";
$msg .= "Content-Transfer-Encoding: 8bit\n\n";///////////////////////////
//--------------------------	
$msgbody="";
$msgbody.="";
$msgbody.="";
$msgbody.="";
$msgbody.="";
$msgbody.="";
$msgbody.="              ";
$msgbody.="                中文測試";
$msgbody.="              ";
$msgbody.="";
$msgbody.="";

$data = $msgbody;
$msg .= $data."\r\n";
$msg .= "--".$mime."--\r\n";
mb_internal_encoding("UTF-8"); 

mb_send_mail($to, $subj, $msg, $header);]]>
	</description>
	<link>http://blog.roodo.com/rocksaying/archives/2998451.html</link>
	<guid>http://blog.roodo.com/rocksaying/archives/2998451.html#comment-16224163</guid>
	<author>meluwu@xuite.net(melu)</author>	<category>文章回應</category>
	<pubDate>Tue, 15 Apr 2008 09:59:10 +0800</pubDate>
</item>
</channel>
</rss>