[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] YNT: [Supheli E-Posta] [M] Re: SetError() #73: CCSID conversion failed



Hello,

Codes like ı and ç are XML entities.  These should be interpreted correctly by your XML parser.  Can you explain what problems these are causing and how you'd like us to help?

-SK

On 11/18/2020 12:29 PM, Nihat Ezer wrote:

Realized that i wrongly trimmed the rest of the receiveBuffer.data, the error code appears no longer

 

However, i keep on getting responses that are not seen properly as it contains special characters with Unicode decimal codes such as ı ç etc

 

Here is the code with last update:

 

dcl-s pEbcdic pointer;                              

dcl-s ebcdic like(receiveBuffer.data) based(pEbcdic);

dcl-s sizeEbcdic int(10) inz;                       

 

dcl-s peIstekCevap varchar(9999);

dcl-ds receiveBuffer qualified;

   size int(10) inz;

   data char(32767) inz;

end-ds;

http_setCCSIDs(1208:1026);

loReturnCode = http_url_post_raw(glUrl

                  : %addr(peIstekCevap)+2

                  : %len(%trim(peIstekCevap))

                  : FD

                  : %paddr(asws_httpVeriyiAl)

                  : HTTP_TIMEOUT

                  : *omit

                  : 'text/xml; charset=UTF-8'

                  : '"http://xxx.com/CoreIns/aMethod"'

 

sizeEbcdic =  http_xlatedyn(receiveBuffer.size: %addr(receiveBuffer.data) : TO_EBCDIC: pEbcdic);                      

receiveBuffer.data = "" 1: sizeEbcdic);

receiveBuffer.size = sizeEbcdic;

 

 

dcl-proc asws_httpVeriyiAl;                                   

    dcl-pi  asws_httpVeriyiAl int(10);                        

        peFD    int(10) value;                                

        peData  char(32767) options(*varsize);                

        peLen   int(10) value;                                

    end-pi;                                                   

 

    dcl-s inBuffer like(receiveBuffer.data);                  

    dcl-s size int(10);                                       

 

    inBuffer = %subst(peData: 1: peLen);                      

    if (receiveBuffer.size + peLen > %len(receiveBuffer.data));

       size = %len(receiveBuffer.data) - receiveBuffer.size;  

    else;                                                     

       size = peLen;                                          

    endif;                                                    

 

    %subst(receiveBuffer.data: receiveBuffer.size + 1: size) = %subst(inBuffer: 1: size);                             

    receiveBuffer.size = receiveBuffer.size + size;           

    return size;                                              

end-proc asws_httpVeriyiAl;

 

--

Cheers,

Nihat

 

Kimden: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> Yerine Scott Klement
Tarih: Wednesday, November 18, 2020 8:46 PM
Kime: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Konu: [Supheli E-Posta] [M] Re: [Ftpapi] SetError() #73: CCSID conversion failed

 

DİKKAT: Bu e-posta kurum dışından gönderilmiştir. Zararlı dosya veya bağlantılar (link) içerebilir. Kaynağından emin olmadığınız dosyaları/bağlantıları (link) açarken veya e-postayı cevaplarken dikkatli olunuz.


According to the manual this error code means "The conversion stopped because of an incomplete character or shift state sequence at the end of the input buffer."

Is it possible that the receiveBuffer.size is incorrect?  Or, whatever process you are using to write the data to the receiveBuffer is not writing it correctly?

Does it work better if you use http_req()?

 

On 11/18/2020 12:10 AM, Nihat Ezer wrote:

Greetings,

 

Attempting to run the following, i have seen that response is not seen properly as it contains special characters with Unicode decimal codes such as &#305; &#231; etc, and gives error message, "SetError() Ö73: CCSID conversion failed: The value specified for the argument is not correct."

 

What am i doing wrong or this could be due to something wrong on the other side, debug or trace file is attached to the mail, can you please advise ?

 

dcl-s peIstekCevap varchar(9999);

dcl-ds receiveBuffer qualified;

   size int(10) inz;

   data char(32767) inz;

end-ds;

 

http_setCCSIDs(1208:1026);

loReturnCode = http_url_post_raw(glUrl

                  : %addr(peIstekCevap)+2

                  : %len(%trim(peIstekCevap))

                  : FD

                  : %paddr(asws_httpVeriyiAl)

                  : HTTP_TIMEOUT

                  : *omit

                  : 'text/xml; charset=UTF-8'

                  : '"http://xxx.com/CoreIns/aMethod"'

 

http_xlatedyn(receiveBuffer.size: %addr(receiveBuffer.data) : TO_EBCDIC: pEbcdic);

 

--

Thank you,

Nihat

 




-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi