How the client encoding is determined

The character encoding (charset parameter) used by HTTP clients for forms data (both for the GET and POST methods) is determined by information in the HTML form.

The HTTP client normally submits forms data using the same character encoding that was used for the HTML form, specified either by the charset parameter on the Content-Type header or by an equivalent META tag embedded in the HTML; for example:

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
You can also use the accept-charset attribute on the HTML FORM element to specify an additional acceptable character encoding. If you do not specify the code page, CICS® obtains this information from the charset parameter. The HTML form character encoding is normally either ISO-8859-1 (CCSID 819) or UTF-8 (CCSID 1208), but is not restricted to these values.

The character encoding information is not typically present as part of the submitted form request. So, if the default character set for the internet (ISO-8859-1) is not used, the application reading the form must specify the encoding using the CHARACTERSET keyword. If CHARACTERSET is omitted, but the HTTP client provides a charset value in a Content-Type header (not standard practice for HTML forms submission), the charset value is used; otherwise, CICS assumes ISO-8859-1.