how does apache know the encoding to use for the content-length that I
assume it adds to the data stream sent to the browser?

-Steve


On Mon, Sep 10, 2012 at 9:17 AM, Kevin Turner
<kevin.turner@xxxxxxxxxxxxxxx> wrote:
No it doesn't, but Apache will usually convert it depending on the CGIConvMode setting.
We always use "CGIConvMode BINARY" so we have complete control over what is, and is not, converted prior to delivery to the browser.



-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Steve Richter
Sent: 10 September 2012 14:13
To: Web Enabling the AS400 / iSeries
Subject: [WEB400] does qtmhWrStout convert from ebcdic to ascii?

Does the QtmhWrStout api convert the data passed to it from ebcdic to ascii?

I ask because I am trying to send excel xml formatted data as an attachment to the browser and the results are gibberish when opened in excel.

I am sending different variations of Content-type and Content-disposition followed by two X'15' line feeds.
wrtDta = 'Content-type: application/vnd.ms-excel' +
newLine +
'Content-disposition: ' +
'attachment; filename=test.xls' + newLine +
newLine ;
pr_qtmhwrstout( wrtdta: %len(wrtdta): wperror ) ;

another version of the content-type I tried:
wrtDta = 'Content-type: application/' +
'vnd.openxmlformats-officedocument.spreadsheetml.sheet' +
newLine +
'Content-disposition: ' +
'attachment; filename=test.xls' + newLine +
newLine ;

then I send the excel xml formatted data: Where each line ends with x'15' . So far I have written the following text to qtmhwrstout as ebcdic and then as ascii. Both times excel shows garbage.

<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40";>
<Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="2"
x:FullColumns="1" x:FullRows="1">
<Row>
<Cell><Data ss:Type="String">Name</Data></Cell>
<Cell><Data ss:Type="String">Example</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">Value</Data></Cell>
<Cell><Data ss:Type="Number">123</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>
--
This is the Web Enabling the AS400 / 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.


NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
--
This is the Web Enabling the AS400 / 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 ...

Replies:

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

This mailing list archive is Copyright 1997-2022 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.