In BBj 16.0 and higher, this method returns the name of the character encoding (MIME charset) used for the body sent in this response. The character encoding may have been specified explicitly using the BBjspWebResponse::setCharacterEncoding(String) or BBjspWebResponse::setContentType(String) methods, or implicitly using the BBjspWebResponse::setLocale(Locale) method. Explicit specifications take precedence over implicit specifications. Calls made to these methods after the response has been committed have no effect on the character encoding. If no character encoding has been specified, ISO-8859-1 is returned.
Return Value |
Method |
String |
getCharacterEncoding() |
None.
a string specifying the name of the character encoding, for example, UTF-8
The example below shows getting the character encoding of a response within a BBJSP Servlet.
This example demonstrates how this works in a BBJSP web-page
|
This example demonstrates how this works in a BBJSP servlet
|