type is always null !!!
Brought to you by:
niallg
private String getCharset() {
ContentType type = getContentType();
if(type == null) {
System.out.println("type is null");
return "ISO-8859-1";
}
if(type.getCharset()==null){
System.out.println("type.getCharset() is null");
return "ISO-8859-1";
}
return type.getCharset();
}
ResponseEntity.java
I have set response charset, but it doesn't even changed!
i have "???????" always, instead of russian symbols.!
Could you confirm you did set the "Content-Type" header of your response to something similar to "text/html; charset=koi8-r" with your own charset?
There is no other way to set the charset without setting the Content-Type.