Approved: Fortect
This guide will help you when you spot a servlet for encoding response clauses.
void setCharacterEncoding (String character set)
Often sets the character encoding (MIME character set) of the response sent to the client in UTF-8 for the script. If the character encoding already consists of set setContentType (java.lang.String)
, or maybe even of setLocale (java.util.Locale)
, this method will do it. Calling setContentType (java.lang.String)
through the And text / html
string that calls this method with a UTF-8 string is equivalent to calling setContentType
with the line text / html; character set = UTF-8
.
void setContentType (string type)
Determines the content type of our response sent to the client in case the response has not been validated. This type of content can have an excellent character encoding specification, such as for example, text / html; charset = UTF-8
.