report inferred encoding
This commit is contained in:
Greg Wilkins 2017-01-20 11:38:21 +11:00
parent 91987d4233
commit f9c829f7cc
1 changed files with 3 additions and 0 deletions

View File

@ -839,6 +839,9 @@ public class Response implements HttpServletResponse
if (_characterEncoding == null)
{
String encoding = MimeTypes.getCharsetAssumedFromContentType(_contentType);
if (encoding!=null)
return encoding;
encoding = MimeTypes.getCharsetInferredFromContentType(_contentType);
if (encoding!=null)
return encoding;
return StringUtil.__ISO_8859_1;