<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[TNF : Tatter Network Foundation forum - 첨부파일에 한글이 있을 경우 깨집니다.]]></title>
		<link>http://forum.tattersite.com/ko/viewtopic.php?id=9602</link>
		<description><![CDATA[첨부파일에 한글이 있을 경우 깨집니다. 의 최근 RSS 글들.]]></description>
		<lastBuildDate>Tue, 06 Apr 2010 10:46:37 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[RSS 답글: 첨부파일에 한글이 있을 경우 깨집니다.]]></title>
			<link>http://forum.tattersite.com/ko/viewtopic.php?pid=38396#p38396</link>
			<description><![CDATA[<p>내용 추가합니다.<br />사파리와 오페라는 원본 그대로 출력하니 되네요...</p><p>line 24 :<br /></p><div class="codebox"><pre><code>$user_agent = $_SERVER[&#039;HTTP_USER_AGENT&#039;];
$is_msie6 = false;
$is_safari = false;
$is_opera = false;
$msie6_str = strstr($user_agent, &#039;MSIE&#039;);
$safari_str = strstr($user_agent, &#039;Safari&#039;);
$opera_str = strstr($user_agent, &#039;Opera&#039;);
if($msie6_str != FALSE)
    $is_msie6 = true;
if($safari_str != FALSE)
    $is_safari = true;
if($opera_str != FALSE)
    $is_opera = true;</code></pre></div><br /><p>line 25 : <br />원본<br /></p><div class="codebox"><pre><code>header(&#039;Content-Disposition: attachment; filename=&quot;&#039; . rawurlencode(UTF8::bring($attachment[&#039;lab    el&#039;])) . &#039;&quot;&#039;);</code></pre></div><p>수정본<br /></p><div class="codebox"><pre><code>if($is_msie6)
    header(&#039;Content-Disposition: attachment; filename=&quot;&#039; . $file_label_encoded . &#039;&quot;&#039;);
else if($is_safari || $is_opera)
    header(&#039;Content-Disposition: attachment; filename=&quot;&#039; . $file_label . &#039;&quot;&#039;);
else
    header(&#039;Content-Disposition: attachment; filename=&quot;&#039; . $file_label_base64 . &#039;&quot;&#039;);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (noneofnone)]]></author>
			<pubDate>Tue, 06 Apr 2010 10:46:37 +0000</pubDate>
			<guid>http://forum.tattersite.com/ko/viewtopic.php?pid=38396#p38396</guid>
		</item>
		<item>
			<title><![CDATA[첨부파일에 한글이 있을 경우 깨집니다.]]></title>
			<link>http://forum.tattersite.com/ko/viewtopic.php?pid=38395#p38395</link>
			<description><![CDATA[<p>첨부파일에 한글이 있는 경우 다운로드시 깨집니다.</p><p>제가 사용중인 버전은 1.8.3.1이고, PHP 5.3입니다.</p><p>아래와 같이 수정하면 Firefox/IE에서는 한글로 받을 수 있더군요.</p><p>tc/interface/blog/attachment.php<br />line 24에 아래와 같은 내용 추가<br /></p><div class="codebox"><pre><code>$user_agent = $_SERVER[&#039;HTTP_USER_AGENT&#039;];
$is_msie6 = false;
$msie6_str = strstr($user_agent, &#039;MSIE&#039;);
if($msie6_str != FALSE)
    $is_msie6 = true;

$file_label = $attachment[&#039;label&#039;];
$file_label_encoded = rawurlencode($file_label);
$file_label_base64 = &#039;=?utf-8?b?&#039; . base64_encode($file_label) . &#039;?=&#039;;</code></pre></div><p>line 25를 아래와 같이 변경합니다.<br />원본<br /></p><div class="codebox"><pre><code>header(&#039;Content-Disposition: attachment; filename=&quot;&#039; . rawurlencode(UTF8::bring($attachment[&#039;lab    el&#039;])) . &#039;&quot;&#039;);</code></pre></div><p>수정본<br /></p><div class="codebox"><pre><code>if($is_msie6)
    header(&#039;Content-Disposition: attachment; filename=&quot;&#039; . $file_label_encoded . &#039;&quot;&#039;);
else
    header(&#039;Content-Disposition: attachment; filename=&quot;&#039; . $file_label_base64 . &#039;&quot;&#039;);</code></pre></div><p>이렇게 하면 IE에서는 한글이 보이기는 하는데 [1]같은 문자가 추가되더군요. 자세한 테스트는 안 해봐서 모르겠습니다.</p>]]></description>
			<author><![CDATA[null@example.com (noneofnone)]]></author>
			<pubDate>Tue, 06 Apr 2010 10:35:21 +0000</pubDate>
			<guid>http://forum.tattersite.com/ko/viewtopic.php?pid=38395#p38395</guid>
		</item>
	</channel>
</rss>
