com.HTTPServiceRequest.setResponseCharset
Defines the HTTP response character set.
Syntax
setResponseCharset(
charset STRING )
- charset defines the HTTP response character set.
Usage
The setResponseCharset()
method defines the character set to use when sending an
HTTP response.
The server must send a response in a character set that the client understands.
If the response character set is not defined by setResponseCharset()
, the same
character set as the client request is used, or the implicit ISO-8859-1 charset is used if the
character is not defined by the client request. If the data to be return is application/json, the
response will be in UTF-8.
The method must be called before sending the response with one of sendResponse
, sendTextResponse
,
sendXmlResponse
, or beginXmlResponse
and endXmlResponse
methods.
In case of error, the method throws an exception and sets the
STATUS
variable. Depending on the error, a human-readable description of the
problem is available in the SQLCA.SQLERRM
register. See Error handling in GWS calls (STATUS).