Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> utl_smtp and japanese characters ?

utl_smtp and japanese characters ?

From: Prem Khanna J <jprem_at_kssnet.co.jp>
Date: Wed, 10 Dec 2003 18:09:24 -0800
Message-ID: <F001.005D9776.20031210180924@fatcity.com>


Hi all,

i have written a small procedure to send e-mail from my oracle database [oracle 9.2.0.3/win2k].

message := 'Date: ' || TO_CHAR( SYSDATE, 'DD-Mon-YYYY HH24:MI:SS' ) || utl_tcp.CRLF;

message := message || 'From: ' || sender || utl_tcp.CRLF;
message := message || 'Subject: ' || subject || utl_tcp.CRLF;
message := message || 'To: ' || recipient || utl_tcp.CRLF;
message := message || 'Mime-Version: 1.0' || utl_tcp.CRLF;
message := message || 'Content-Type: text/plain;
charset="ISO-2022-JP"'||utl_tcp.CRLF;
message := message || '$BI=NN0hL>(B' || chr(9) || '$B6u$-NN0h(B (MB)' || utl_tcp.CRLF; # JAPANESE CHARACTERS ARE HERE mail_conn :=utl_smtp.open_connection(mailhost,25);
utl_smtp.helo(mail_conn,mailhost);
utl_smtp.mail(mail_conn,sender);
utl_smtp.rcpt(mail_conn,recipient);
utl_smtp.open_data(mail_conn);
utl_smtp.write_data(mail_conn, message);
utl_smtp.close_data(mail_conn);
utl_smtp.quit(mail_conn);

the japanese characters come out as ??? in the e-mail, whereas english characters work fine.
what's wrong with my code ? Can someone help me ?

Regards,
Jp.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Prem Khanna J
  INET: jprem_at_kssnet.co.jp

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Dec 10 2003 - 20:09:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US