× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Nathan,

I get all garbage with an EBCDIC body and header Content-type: text/html or
text/plain; charset=utf-8 ...

clearsrvpgm();
setContent('text/plain; charset=utf-8');

echo('Hello world');
echoToClient();

Result in the browser:

ȅ���@�����
%

If i remove the charset=utf-8 all works fine


On Wed, Jul 3, 2013 at 11:22 PM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:

Henrik,

content-type: text/plain; charset=UTF-8

seems to work fine (the output is readable in the browser / client).

whereas:

content-type: application/xml; charset=UTF-8

does not work (the output is unreadable in the browser / client).

My understanding is that the HTTP server performs NO encoding of output
body in Binary mode; The RAW EBCDIC stream is output, so it appears
scrambled on the client.

CCSIDs, Code Pages, Conversion Modes, the effect of HTTP configuration
directives and headers are all confusing to me. But are we on the same
page?

-Nathan.

.



________________________________
From: Henrik Rützou <hr@xxxxxxxxxxxx>
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Sent: Wednesday, July 3, 2013 2:19 PM
Subject: Re: [WEB400] XML response is getting scrambled


Nathan,

content-type: text/plain; charset=UTF-8

will set the server in BINARY mode
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.