PL/SQL (MOSC)

MOSC Banner

Bug - UTL_SMTP for chinese characters with CLOB

edited Aug 18, 2020 11:55AM in PL/SQL (MOSC) 4 commentsAnswered ✓

Hi All

When I try to write Chinese characters in a CLOB variable using

UTL_SMTP.write_data (objconnection, dbms_lob.substr(pivcbody, 1, v_offset)); it is printing as Question mark ???? instead of the chinese character 付款说明

The code i have used is

  objconnection := UTL_SMTP.open_connection (pivcmailip, pinport);

  UTL_SMTP.ehlo (objconnection, pivcmailip);

  UTL_SMTP.mail (objconnection, pivcfromemail);

  UTL_SMTP.rcpt (objconnection, pivctoemail);

  UTL_SMTP.open_data (objconnection);

  UTL_SMTP.write_data (objconnection, 'From: ' || '"' || pivcfromname || '" <' || pivcfromemail || '>' || UTL_TCP.crlf );

  UTL_SMTP.write_data (objconnection, 'To: ' || '"' || pivctoname || '" <' || pivctoemail || '>' || UTL_TCP.crlf );

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center