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

[Ftpapi] HTTPAPI Character conversion



Hi

 

I am using the example 4 program from HTTPAPI  but have changed it to call this web address http://testcerts.online/as400/chartest.asp instead.

The webpage returns these results;

 

[ { "success":true, "errmsg":"" ,"list": [ { "CertNo":"630033267", "length":"0.00" }, "CertNo":"630033268", "length":"10.00" } ] } ]

 

However when the results are stored in the IFS output file from the modified example 4 program, the two opening [ (square) brackets are translated into ^ (Caret)  ( HEX 5B) symbol.  The closing ] (square) (HEX 5D) brackets are perfect.

 

I have found that if I get the webpage to write out HEX character A3 (ASCII 163) it does appear in the log and output file as an opening square brackets but appears on the website as a UK pound symbol.

Any ideas pleas?

 

The program runs with the following job attributes

DSPJOB (option 2)

 

Language identifier . . . . . . . . . . . . . . . :   ENU     

Country or region identifier  . . . . . . . . . . :   GB      

Coded character set identifier  . . . . . . . . . :   37      

Default coded character set identifier  . . . . . :   37      

Character identifier control  . . . . . . . . . . :   *DEVD   

 

 

Debug File;

 

************Beginning of data**************

HTTPAPI Ver 1.42 released 2020-10-12                                   

NTLM Ver 1.4.0 released 2014-12-22                                     

OS/400 Ver V7R3M0                                                      

                                                                        

New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0

http_persist_open(): entered                                           

http_long_ParseURL(): entered                                          

DNS resolver retrans: 2                                                

DNS resolver retry  : 2                                                

DNS resolver options: x'00000136'                                      

DNS default domain: BROWNTAWSE.COM                                     

DNS server found: 8.8.8.8                                               

DNS server found: 8.8.4.4                                              

DNS server found: 194.168.4.123

Nagle's algorithm (TCP_NODELAY) disabled.           

http_persist_req(POST) entered.                     

http_long_ParseURL(): entered                       

http_long_ParseURL(): entered                       

do_oper(POST): entered                              

There are 0 cookies in the cache                    

POST /as400/chartest.asp HTTP/1.1                   

Host: testcerts.online                              

User-Agent: http-api/1.43                           

Content-Type: application/x-www-form-urlencoded     

Content-Length: 30                                   

senddoc(): entered

itemno=1541001JO++++++&castno=                                    

recvresp(): entered                                                

HTTP/1.1 200 OK                                                   

Cache-Control: private                                            

Content-Type: text/html                                           

Server: Microsoft-IIS/10.0                                        

Set-Cookie: ASPSESSIONIDCQTDAQCD=MDOLPBOBNLOLECNAOFAAHKDO; path=/ 

Date: Thu, 04 Feb 2021 13:12:53 GMT                                

Content-Length: 154                                               

SetError() #13: HTTP/1.1 200 OK                                    

recvresp(): end with 200                                          

recvdoc parms: identity 154

header_load_cookies() entered                                                  

cookie_parse() entered                                                         

cookie =  ASPSESSIONIDCQTDAQCD=MDOLPBOBNLOLECNAOFAAHKDO; path=/                

cookie attr ASPSESSIONIDCQTDAQCD=MDOLPBOBNLOLECNAOFAAHKDO                      

cookie attr path=/                                                              

recvdoc(): entered                                                             

SetError() #0:                                                                 

recvdoc(): Receiving 154 bytes.                                                 

^  {  "success":true,  "errmsg":""  ,"list": ^   {   "CertNo":"630033267",   "length":"0.00"   },   "CertNo":"630033268",   "length":"10.00"   }    ]  } ] 

http_close(): entered                                                          

 ************End of Data********************                                                                                                                                                    

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