[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: One Question About Character Conversation .. XML
Hi Nicolas,
> if I call "HTTP_SetFileCCSID()" function , just befor the call to
> "http_url_post_stmf() " Can I get what I need?
Yes, that is what HTTP_setFileCCSID() is for. However, please
understand this:
HTTPAPI does not know the CCSID of the data it has received. It merely
receives the bytes and puts them into a file. You tell it what CCSID
that file is, so it can mark the file appropriately. HTTPAPI does no
translation, and assumes you are right.
From your description, the data is UTF-8, so you should call
http_setFileCCSID() and give it a CCSID of 1208. (which is the CCSID
for UTF-8). HTTPAPI will save your data to the file, and mark it with
that CCSID.
XML-INTO will see that the file is marked with CCSID 1208, and will
translate it for you when it reads it into your program.
> And my second question is, why is 1252 the ccsid of the file, if the
> global variable in HTTPAPI , I think, is 819 ?
I can't answer that. HTTPAPI wouldn't do that (unless you told it to).
But HTTPAPI only sets the CCSID of a file *if* it creates that file.
If the file already exists in the IFS, it'll leave the same CCSID the
file had before.
So perhaps that file was created separately with a CCSID of 1252?
> Another solution will be open the response file, before calling
> "http_url_post_stmf()"... I see that HTTPAPI truncate the file if it
> exist.
Yes, that's true. Why are you telling me this?
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------