Forum Stats

  • 3,767,751 Users
  • 2,252,713 Discussions
  • 7,874,327 Comments

Discussions

Unicode SMS Sending Problem in Oracle Apex 20.1

I want to send Bangali SMS from oracle apex using SMS API.

I created a PLSQL Dynamic Content to send SMS through my SMS API.

But the problem is Bengali font does not show in the recipient.

But when I send sms directly from browser It works fine for me using my API.

Here is PL/SQL Dynamic Content Code:

DECLARE

  VAR_API_KEY  VARCHAR2 (200);

  VAR_CONTACTS  VARCHAR2 (20);

  VAR_SENDERID  VARCHAR2 (1000);

  VAR_MSG    VARCHAR2 (1000);

  VAR_MSG1 varchar2(4000); 


  VAR_RESPONSE  VARCHAR2 (1600);

  VAR_URL    VARCHAR2 (2000);

  REQ      UTL_HTTP.REQ;

  RESP      UTL_HTTP.RESP;

BEGIN

  VAR_API_KEY := 'XXXXXXXXXXXXXX';

  VAR_CONTACTS := '019XXXXXXX;

  VAR_SENDERID := 'XXXXXX';


select MSG_TEXT into VAR_MSG from MY_MSG_TABLE where ACTIVE_STATUS='Y';  

---- Example : VAR_MSG :='কোভিড- ১৯ রোগীর Follow UP চেকআপ';

VAR_URL :=

         'http://sms.myvendorcompanyname.com/api/v1/send?api_key='

   || VAR_API_KEY

   || '&contacts='

   || UTL_URL.ESCAPE (VAR_CONTACTS, TRUE)

   || '&senderid='

   || UTL_URL.ESCAPE (VAR_SENDERID, TRUE)

   || '&msg='

   || UTL_URL.ESCAPE (VAR_MSG1, TRUE);      

    

  UTL_HTTP.SET_RESPONSE_ERROR_CHECK (ENABLE => TRUE);

  UTL_HTTP.SET_DETAILED_EXCP_SUPPORT (ENABLE => TRUE);

  REQ := UTL_HTTP.BEGIN_REQUEST (URL => VAR_URL, METHOD => 'POST');

 UTL_HTTP.set_header(REQ, 'Content-Length', NVL(length(VAR_MSG),0));


   UTL_HTTP.set_header(REQ, 'ACCEPT', 'application/json');


   utl_http.set_header(REQ, 'Content-Type', 'application/json;charset=UTF-8');  


   utl_http.set_body_charset(REQ,'UTF-8');

  RESP := UTL_HTTP.GET_RESPONSE (R => REQ);

  UTL_HTTP.END_RESPONSE (R => RESP);

  VAR_RESPONSE := TRIM (UPPER (VAR_RESPONSE));

  

END;

/


I send the following sms:

'কোভিড- ১৯ রোগীর Follow UP চেকআপ'

My Message show in recipient :::

?????- ?? ????? Follow UP ????? ???


Thanks in advance.