If it helps, Nathan, IBM has info about how the different CgiConvMode
settings react to the 'charset' keyword here:
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzaie/rzag3ch1envvar.htm
(Make sure you look at Table 2, because Table 1 is for input.)
Since your content-type is not 'text/*' it will not do translation of
the body, only the headers. Since you say 'utf-8', it'll try to figure
out the EBCDIC equivalent of UTF-8 and translate accordingly. (No idea
what that would be -- there really isn't an EBCDIC equivalent of UTF-8.
I bet it assumes the job CCSID, but it doesn't say...)
If you specified text/xml, and utf-8, I suspect it doesn't translate the
body of document, since there is no EBCDIC equivalent of UTF-8. On the
other hand, if you had specified iso-8859-1, I bet it would translate
because there is an EBCDIC equivalent of that.
But, in any case, because you're using 'application/xml' (not text/xml)
it shouldn't translate.
On 7/2/2013 8:33 PM, Nathan Andelin wrote:
Hello,
I'm writing a CGI web service that returns XML in accordance with a specification which mandates Content-Type: application/xml;charset="utf-8" in the HTTP Header.
Content-Type: text/plain works fine.
But
Content-Type: application/xml;charset="utf-8" causes the stream to get scrambled before being returned to the browser.
What is the secret to getting the encoding right?
-Nathan.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.