【发布时间】:2016-12-11 18:44:01
【问题描述】:
上下文:我正在尝试使用 Oracle 过程(仅 html/text,而不是 text/plain)发送邮件。 我使用 Oracle 9i。
问题:当html消息中包含é(é)这样的字符时,它会忽略它,只写;。 但是当我在 html 消息中直接写 é 时,它会发送 e ,这样更好。
例子:
消息发送:
l_html := '<html>
<head><title>Test HTML message</title></head>
<p>trying à with accent : à</p>
<p>trying HTML encoding of foreign language characters : à
</body>
</html>';
消息接收:
trying a with accent : a
trying HTML encoding of foreign language characters : ;
是否可以使用 Oracle 9i 将两者都转换为相同的“a”或“à”?
我使用的一些代码:
l_boundary CONSTANT VARCHAR2(255) DEFAULT 'a1b2c3d4e3f2g1';
l_temp := l_temp || 'MIME-Version: 1.0' || carriageReturn;
l_temp := l_temp || 'To: ' || p_to || carriageReturn;
l_temp := l_temp || 'Cc: ' || p_cc || carriageReturn;
l_temp := l_temp || 'From: ' || p_from || carriageReturn;
l_temp := l_temp || 'Subject: ' || p_subject || carriageReturn;
l_temp := l_temp || 'Reply-To: ' || p_from || carriageReturn;
l_temp := l_temp || 'Content-Type: multipart/alternative; boundary=' || CHR(34) || l_boundary || CHR(34) || carriageReturn;
-- Write the HTML boundary
l_temp := carriageReturn || carriageReturn || '--' || l_boundary || carriageReturn;
l_temp := l_temp || 'content-type: text/html; charset=windows-1252' || carriageReturn || carriageReturn;
l_offset := dbms_lob.getlength(l_body_html) + 1;
dbms_lob.WRITE(l_body_html, LENGTH(l_temp), l_offset, l_temp);
有人可以帮帮我吗?
【问题讨论】:
标签: oracle email plsql oracle9i