甲骨文 11g。PL/SQL。Oracle 使用 AL32UTF8。
LastName
--------
Manaña
Oracle 中 ñ 的 unicode 值为 (00F1),ascii 值为 (0241)。当我在电子邮件中发送此值时。电子邮件内容为“manan?a”。十六进制的电子邮件值为 (3F)。
问题:当我通过电子邮件发送时,如何保留我的“ñ”?
这是选择转储:
select dump(last_name) => [Typ=1 Len=7: 77,97,110,97,195,177,97]
当我发送电子邮件时,我调用 package.mail 这是那个片段
last_name := 'Manaña'
packagename.mail(recipient ==>'emailrecipeint@blah.com',
subject ==>'Email Subject',
message ==>last_name);
PROCEDURE mail(sender IN VARCHAR2 default 'non-reply@company.edu',
recipients IN VARCHAR2,
subject IN VARCHAR2,
message IN VARCHAR2) IS
conn utl_smtp.connection;
userid varchar2(256);
globalname varchar2(256);
BEGIN
conn := begin_mail(sender, recipients, subject);
select global_name into globalname from global_name;
select user into userid from dual;
write_text(conn, message);
end_mail(conn);
END;
这是package.write_text的片段
PROCEDURE write_text(conn IN OUT NOCOPY utl_smtp.connection,
message IN VARCHAR2) IS
BEGIN
utl_smtp.write_data(conn, message);
END;