I am teaching myself about sending and recieving XML data over http requests, by rewriting a program that uses http_url_post
I notice that for this program (no idea if it is the same for others), the recieved stream file has CCSID 819 - ASCII
What determines this? Can it be changed or overridden?
The received XML data is encoded with UTF-8 according to the declaration line - is there a chance of incompatibility here, if the recieved data contains characters valid in UTF-8 but not in ASCII?
What would be the best way to pull the file from the IFS into an RPG program, and parse it into an XML_CLOB? I was thinking:
Casting it to ccsid 1208 so it matches the UTF-8 encoding in the XML declaration, otherwise xmlparse complains
Is there a better way?
I notice that for this program (no idea if it is the same for others), the recieved stream file has CCSID 819 - ASCII
What determines this? Can it be changed or overridden?
The received XML data is encoded with UTF-8 according to the declaration line - is there a chance of incompatibility here, if the recieved data contains characters valid in UTF-8 but not in ASCII?
What would be the best way to pull the file from the IFS into an RPG program, and parse it into an XML_CLOB? I was thinking:
Code:
exec sql set :clobVar = xmlparse(document cast(get_clob_from_file('/ifspath/filename.xml') as varchar(10000) ccsid 1208))
Is there a better way?
Comment