<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Sending UTF-8 email with Oracle</title>
	<atom:link href="http://www.missiondata.com/blog/database/79/sending-utf-8-email-with-oracle/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.missiondata.com/blog/database/79/sending-utf-8-email-with-oracle/</link>
	<description>Louisville-based Web Development &#038; Software Engineering</description>
	<lastBuildDate>Thu, 13 May 2010 10:34:28 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Manfred</title>
		<link>http://www.missiondata.com/blog/database/79/sending-utf-8-email-with-oracle/comment-page-1/#comment-25849</link>
		<dc:creator>Manfred</dc:creator>
		<pubDate>Sun, 22 Jul 2007 18:56:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.missiondata.com/blog/uncategorized/79/sending-utf-8-email-with-oracle/#comment-25849</guid>
		<description>Hi,

I have a stored procedure for sending email in html format and my database server is installed on unix platform.

I wanna insert a banner image in the email. I was told that I cannot put that banner image on the web server, so I cannot set a specific URL for the image in my stored procedure. 

I tried to put that image on my database server, e.g /home/dev/images/banner.jpg. However, would it work if I specific that image link like /home/dev/images/banner.jpg in my SP? What should I do if i wanna make use of the image on that path? I saw some other websites that the others will specific the link like c:\dev\images\banner.jpg so they can send the image from that path. 

What I should do? I got no ideas, thanks in advance for your help!

Cheers
Manfred</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I have a stored procedure for sending email in html format and my database server is installed on unix platform.</p>
<p>I wanna insert a banner image in the email. I was told that I cannot put that banner image on the web server, so I cannot set a specific URL for the image in my stored procedure. </p>
<p>I tried to put that image on my database server, e.g /home/dev/images/banner.jpg. However, would it work if I specific that image link like /home/dev/images/banner.jpg in my SP? What should I do if i wanna make use of the image on that path? I saw some other websites that the others will specific the link like c:\dev\images\banner.jpg so they can send the image from that path. </p>
<p>What I should do? I got no ideas, thanks in advance for your help!</p>
<p>Cheers<br />
Manfred</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steveny</title>
		<link>http://www.missiondata.com/blog/database/79/sending-utf-8-email-with-oracle/comment-page-1/#comment-24664</link>
		<dc:creator>steveny</dc:creator>
		<pubDate>Fri, 06 Jul 2007 20:18:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.missiondata.com/blog/uncategorized/79/sending-utf-8-email-with-oracle/#comment-24664</guid>
		<description>Ah yes.  This is because quoted printable lines are not supposed to be over 60 characters long so oracle places an =\n after every 60 characters.  This is the correct behavior, but breaks the subject.

A quick hack to fix it is:
&lt;pre&gt;
&lt;code&gt;
lv_encoded_subject:= REPLACE(UTL_RAW.CAST_TO_VARCHAR2(UTL_ENCODE.QUOTED_PRINTABLE_ENCODE(UTL_RAW.CAST_TO_RAW(lv_Subject))), &#039;=&#039; &#124;&#124; CHR(13) &#124;&#124; CHR(10), &#039;&#039;);
UTL_SMTP.WRITE_DATA(lv_Conn, &#039;Subject: =?UTF-8?Q?&#039; &#124;&#124; lv_encoded_subject &#124;&#124; &#039;?=&#039; &#124;&#124; UTL_TCP.CRLF);
&lt;/code&gt;
&lt;/pre&gt;
This smashes the line back together again.  It breaks the spec, and code that correctly constructs the quoted printable string should be used -- but this worked everywhere I tried it.</description>
		<content:encoded><![CDATA[<p>Ah yes.  This is because quoted printable lines are not supposed to be over 60 characters long so oracle places an =\n after every 60 characters.  This is the correct behavior, but breaks the subject.</p>
<p>A quick hack to fix it is:</p>
<pre>
<code>
lv_encoded_subject:= REPLACE(UTL_RAW.CAST_TO_VARCHAR2(UTL_ENCODE.QUOTED_PRINTABLE_ENCODE(UTL_RAW.CAST_TO_RAW(lv_Subject))), '=' || CHR(13) || CHR(10), '');
UTL_SMTP.WRITE_DATA(lv_Conn, 'Subject: =?UTF-8?Q?' || lv_encoded_subject || '?=' || UTL_TCP.CRLF);
</code>
</pre>
<p>This smashes the line back together again.  It breaks the spec, and code that correctly constructs the quoted printable string should be used &#8212; but this worked everywhere I tried it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juan</title>
		<link>http://www.missiondata.com/blog/database/79/sending-utf-8-email-with-oracle/comment-page-1/#comment-21062</link>
		<dc:creator>Juan</dc:creator>
		<pubDate>Tue, 29 May 2007 07:37:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.missiondata.com/blog/uncategorized/79/sending-utf-8-email-with-oracle/#comment-21062</guid>
		<description>My english is really bad.

I tried this example into an Oracle 9 and it worked perfectly until I wrote a subject greater than 60 characters (approximattely). It truncates the subject at this position.

Any idea?</description>
		<content:encoded><![CDATA[<p>My english is really bad.</p>
<p>I tried this example into an Oracle 9 and it worked perfectly until I wrote a subject greater than 60 characters (approximattely). It truncates the subject at this position.</p>
<p>Any idea?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
