<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>sylvan &#187; coldfusion</title>
	<atom:link href="http://www.sylvan-l.net/b/tag/coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sylvan-l.net/b</link>
	<description>GTD、ユーザビリティ、iPhone、本、アート</description>
	<lastBuildDate>Sat, 04 Feb 2012 17:44:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.sylvan-l.net/b/tag/coldfusion/feed/" />
		<item>
		<title>ColdFusionでメールを送る際に全角ハイフンや波文字が文字化けする</title>
		<link>http://www.sylvan-l.net/b/2008/01/08/coldfusion%e3%81%a7%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%92%e9%80%81%e3%82%8b%e9%9a%9b%e3%81%ab%e5%85%a8%e8%a7%92%e3%83%8f%e3%82%a4%e3%83%95%e3%83%b3%e3%82%84%e6%b3%a2%e6%96%87%e5%ad%97%e3%81%8c%e6%96%87/</link>
		<comments>http://www.sylvan-l.net/b/2008/01/08/coldfusion%e3%81%a7%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%92%e9%80%81%e3%82%8b%e9%9a%9b%e3%81%ab%e5%85%a8%e8%a7%92%e3%83%8f%e3%82%a4%e3%83%95%e3%83%b3%e3%82%84%e6%b3%a2%e6%96%87%e5%ad%97%e3%81%8c%e6%96%87/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 08:46:06 +0000</pubDate>
		<dc:creator>sylvan</dc:creator>
				<category><![CDATA[その他]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[mojibake]]></category>

		<guid isPermaLink="false">http://www.sylvan-l.net/b/2008/01/08/coldfusion%e3%81%a7%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%92%e9%80%81%e3%82%8b%e9%9a%9b%e3%81%ab%e5%85%a8%e8%a7%92%e3%83%8f%e3%82%a4%e3%83%95%e3%83%b3%e3%82%84%e6%b3%a2%e6%96%87%e5%ad%97%e3%81%8c%e6%96%87/</guid>
		<description><![CDATA[cfmail関数でメール送信する際に波文字(〜)や、全角ハイフン(−)が ? となって表示される現象が発生しました。 調べてみると、Unicodeの文字列をJISに変換する際に間違って変換してしまうという問題がCFというかJavaにあるらしく（ここ）、その為文字化けが発生していました。 対応方法はメールの送信前に以下のコードを使って文字化け対象の文字を変換することです。 &#60;cfset body=replace&#40;body, "#chr(inputbasen("ff5e",16))#", "#chr(inputbasen("301c",16))#", "all"&#41;&#62; &#60;cfset body=replace&#40;body, "#chr(inputbasen("2225",16))#", "#chr(inputbasen("2016",16))#", "all"&#41;&#62; &#60;cfset body=replace&#40;body, "#chr(inputbasen("ff0d",16))#", "#chr(inputbasen("2212",16))#", "all"&#41;&#62; &#60;cfset body=replace&#40;body, "#chr(inputbasen("ffe0",16))#", "#chr(inputbasen("00a2",16))#", "all"&#41;&#62; &#60;cfset body=replace&#40;body, "#chr(inputbasen("ffe1",16))#", "#chr(inputbasen("00a3",16))#", "all"&#41;&#62; &#60;cfset body=replace&#40;body, "#chr(inputbasen("ffe2",16))#", "#chr(inputbasen("00ac",16))#", "all"&#41;&#62; 参考サイト Macromedia ColdFusion: - insert title here]]></description>
			<content:encoded><![CDATA[<p>cfmail関数でメール送信する際に波文字(〜)や、全角ハイフン(−)が ? となって表示される現象が発生しました。</p>
<p>調べてみると、Unicodeの文字列をJISに変換する際に間違って変換してしまうという問題がCFというかJavaにあるらしく（<a href="http://www.ingrid.org/java/i18n/encoding/ja-conv.html">ここ</a>）、その為文字化けが発生していました。</p>
<p>対応方法はメールの送信前に以下のコードを使って文字化け対象の文字を変換することです。</p>
<div class="syntax_hilite">
<div id="code-2">
<div class="code">&lt;cfset body=replace<span style="color:#006600; font-weight:bold;">&#40;</span>body, <span style="color:#CC0000;">"#chr(inputbasen("</span>ff5e<span style="color:#CC0000;">",16))#"</span>, <span style="color:#CC0000;">"#chr(inputbasen("</span>301c<span style="color:#CC0000;">",16))#"</span>, <span style="color:#CC0000;">"all"</span><span style="color:#006600; font-weight:bold;">&#41;</span>&gt;<br />
&lt;cfset body=replace<span style="color:#006600; font-weight:bold;">&#40;</span>body, <span style="color:#CC0000;">"#chr(inputbasen("</span>2225<span style="color:#CC0000;">",16))#"</span>, <span style="color:#CC0000;">"#chr(inputbasen("</span>2016<span style="color:#CC0000;">",16))#"</span>, <span style="color:#CC0000;">"all"</span><span style="color:#006600; font-weight:bold;">&#41;</span>&gt;<br />
&lt;cfset body=replace<span style="color:#006600; font-weight:bold;">&#40;</span>body, <span style="color:#CC0000;">"#chr(inputbasen("</span>ff0d<span style="color:#CC0000;">",16))#"</span>, <span style="color:#CC0000;">"#chr(inputbasen("</span>2212<span style="color:#CC0000;">",16))#"</span>, <span style="color:#CC0000;">"all"</span><span style="color:#006600; font-weight:bold;">&#41;</span>&gt;<br />
&lt;cfset body=replace<span style="color:#006600; font-weight:bold;">&#40;</span>body, <span style="color:#CC0000;">"#chr(inputbasen("</span>ffe0<span style="color:#CC0000;">",16))#"</span>, <span style="color:#CC0000;">"#chr(inputbasen("</span>00a2<span style="color:#CC0000;">",16))#"</span>, <span style="color:#CC0000;">"all"</span><span style="color:#006600; font-weight:bold;">&#41;</span>&gt;<br />
&lt;cfset body=replace<span style="color:#006600; font-weight:bold;">&#40;</span>body, <span style="color:#CC0000;">"#chr(inputbasen("</span>ffe1<span style="color:#CC0000;">",16))#"</span>, <span style="color:#CC0000;">"#chr(inputbasen("</span>00a3<span style="color:#CC0000;">",16))#"</span>, <span style="color:#CC0000;">"all"</span><span style="color:#006600; font-weight:bold;">&#41;</span>&gt;<br />
&lt;cfset body=replace<span style="color:#006600; font-weight:bold;">&#40;</span>body, <span style="color:#CC0000;">"#chr(inputbasen("</span>ffe2<span style="color:#CC0000;">",16))#"</span>, <span style="color:#CC0000;">"#chr(inputbasen("</span>00ac<span style="color:#CC0000;">",16))#"</span>, <span style="color:#CC0000;">"all"</span><span style="color:#006600; font-weight:bold;">&#41;</span>&gt;</div>
</div>
</div>
<p></p>
<p>参考サイト<br />
<a href="http://www.adobe.com/jp/support/coldfusion/ts/documents/jp_char_corruption.htm">Macromedia ColdFusion: - insert title here</a></p>
<p><a href="http://www.amazon.co.jp/gp/redirect.html%3FASIN=B000VJ2DX2%26tag=lsa00-22%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/B000VJ2DX2%253FSubscriptionId=0EMV44A9A5YT1RVDGZ82" title="View product details at Amazon"><img src="http://ecx.images-amazon.com/images/I/01TKOkF3xHL.jpg" alt="Adobe ColdFusion Standard 8.0 日本語版 (2CPUS)" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sylvan-l.net/b/2008/01/08/coldfusion%e3%81%a7%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%92%e9%80%81%e3%82%8b%e9%9a%9b%e3%81%ab%e5%85%a8%e8%a7%92%e3%83%8f%e3%82%a4%e3%83%95%e3%83%b3%e3%82%84%e6%b3%a2%e6%96%87%e5%ad%97%e3%81%8c%e6%96%87/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.sylvan-l.net/b/2008/01/08/coldfusion%e3%81%a7%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%92%e9%80%81%e3%82%8b%e9%9a%9b%e3%81%ab%e5%85%a8%e8%a7%92%e3%83%8f%e3%82%a4%e3%83%95%e3%83%b3%e3%82%84%e6%b3%a2%e6%96%87%e5%ad%97%e3%81%8c%e6%96%87/" />
	</item>
	</channel>
</rss>

