Current project: create a CGI that can put
Unicode (UTF-16) data to the client.
But... I can't seem to tell the HTTP server
not to try and translate from EBCDIC - just
send it in binary.
I have a working Assembler CGI. I have now
created a modified version to put out UTF-16
instead of EBCDIC [translate to ASCII, thank
you very much].
I tried this:
call setenv,(var_uni,utf_16,set_it),mf=(e,plist)
where the fields are defined as:
var_uni dc c'CONTENT_ENCODING',x'00'
utf_16 dc c'UTF-16',x'00'
set_it dc f'1'
then writing out some Unicode XHTML headers:
call printf,(charset1),vl,mf=(e,plist) content-type header
call printf,(charset2),vl,mf=(e,plist) content-type header
call printf,(blank),vl,mf=(e,plist) blank line
call printf,(oc_1),vl,mf=(e,plist) xml declaration
call printf,(oc_2),vl,mf=(e,plist) DOCTYPE
call printf,(oc_3),vl,mf=(e,plist) declaration
call printf,(oc_4),vl,mf=(e,plist) comment
call printf,(oc_5),vl,mf=(e,plist) html start tag
call printf,(oc_6),vl,mf=(e,plist) head start tag
call printf,(oc_7),vl,mf=(e,plist) title element
call printf,(oc_8),vl,mf=(e,plist) head end tag
call printf,(oc_9),vl,mf=(e,plist) h1 element
call printf,(oc_a),vl,mf=(e,plist) body start tag
call printf,(oc_b),vl,mf=(e,plist) h2 start tag
where the variables are defined as:
charset1 dc CUL174'<meta http-equiv="Content-type" ',x'000A'
charset2 dc CUL174'content="text/html; charset=utf-16">',x'000A'
blank dc x'00',x'0A'
oc_1 dc cu'<?xml version="1.0" encoding="UTF-16"?>'
dc x'000A'
oc_2 dc cu'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
dc x'000A'
oc_3 dc cu' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
dc x'000A'
oc_4 dc cu'<!-- Copyright (C) 2006 by Steven H. Comstock -->'
dc x'000A'
oc_5 dc cu'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">'
dc x'000A'
oc_6 dc cu'<head>'
dc x'000A'
oc_7 dc cu'<title>Output from Assembler CGI on z/OS</title>'
dc x'000A'
oc_8 dc cu'</head>'
dc x'000A'
oc_9 dc cu'<h1>Comin'' at ya'' from ASMCGI16</h1>'
dc x'000A'
oc_a dc cu'<body>'
dc x'000A'
oc_b dc cu'<h2>'
dc x'000A'
I set up a test html page that invokes this CGI, and I get
no response, no dump, no entries in the error log that I
can find.
Any suggestions?
Kind regards,
-Steve Comstock
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html