Question

Spanish accents disappear in the message

  • 19 February 2024
  • 6 replies
  • 33 views

Userlevel 1
Badge +5
  • Do Gooder (Customer)
  • 17 replies

Hello,

 

We have defined an Event that sends an email  in Spanish with accents.

The mail is sent, but all the accents disappear in the message.

How can we show the accents in the message?.

 

Below the Event Action:

DECLARE
v_From      VARCHAR2(80) := 'aaa@XXXX.com';
v_Recipient VARCHAR2(80) := 'bbb@XXXX.com';
v_Subject   VARCHAR2(80) := 'Nueva evaluación de proveedor';
v_Mail_Host VARCHAR2(30) := 'smtp.XXXX.com';
v_Mail_Conn utl_smtp.Connection;
crlf        VARCHAR2(2)  := chr(13)||chr(10);
msg VARCHAR2(1000):=NULL;

BEGIN
msg:='Se solicita realizar la evaluación de la orden de compra &NEW:PO_REF_NUMBER, con código de proyecto &NEW:PROJECT_ID. ' ;
    v_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host, 25);
    utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
    utl_smtp.Mail(v_Mail_Conn, v_From);
    utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
    utl_smtp.Data(v_Mail_Conn,
       'From: '   || v_From || crlf ||
       'Subject: '|| v_Subject || crlf ||
       'To: '     || v_Recipient || crlf ||
       crlf ||
       msg || crlf     -- Message body
    );
    utl_smtp.Quit(v_mail_conn);


EXCEPTION
 WHEN utl_smtp.Transient_Error OR utl_smtp.Permanent_Error then
   raise_application_error(-20000, 'Unable to send mail', TRUE);

END;

 

This is how we receive the email:

[EXTERNAL]  Nueva evaluacion de proveedor

Se solicita realizar la evaluacion de la orden de compra 28, con codigo de proyecto 18BE011800.

 

Best regards,

Amaia


6 replies

Userlevel 7
Badge +16

Hi,

 

Try using ASCII character for this

 

Userlevel 5
Badge +13

Hi @Amaia,

I’m not technician, but reviewing the online documentation for ‘Email Reports’ I see that you could check if ‘text/html’ is used in Mail Sender used in Event Action.

Regards,

Pilar

Userlevel 1
Badge +5

Hello Dumeesha,

Thank you for your reply. I have tried using Ascii code, but I got the same result, accents are not displayed.

 

Userlevel 1
Badge +5

Hello Pilar,

Thank you for your answer. I have changed the conten_type from “text/plain” to “text/html” in “Mail_sender1”, but I didn’t get any difference in the email. Accents are not shown.

 

Userlevel 7
Badge +16

Hello Dumeesha,

Thank you for your reply. I have tried using Ascii code, but I got the same result, accents are not displayed.

 

Hi,

I had a issue in PL SQL when Identifying Nordic characters. The reason was because of this below registry entry.

 

Then I followed below post and did the windows environment variable setting as indicated there and able to solve the issue. I suggest you to try that

Change NLS_LANG on Oracle Instant Client. | IFS Community

 

Userlevel 1
Badge +5

Hello,

I have this registry entry:

I have created this system variable:

 

But, the email I receive still doesn’t show the accents.

Reply