Mantis - Resin
Viewing Issue Advanced Details
343 minor always 08-10-05 00:00 11-30-05 14:42
sam  
 
high  
closed 3.0.14  
3.0.14 fixed  
none    
none 3.0.15  
0000343: configuration to change default encoding for everything
RSN-387
(rep by E Bowman)

My intent is to only use UTF-8 encoding. I wish to change Resin's default response content encoding from ISO-8859-1 to UTF-8, across all file and MIME
types, including the status response codes. I would rather not have an entry
for each MIME type or file extension.
 
We understand now that the <character-encoding> tag modifies the encoding of the
request itself, including any POST data, but Resin's default seems to be UTF-8,
anyway.
 

Notes
(0000390)
sam   
08-10-05 00:00   
Currently there is no simple way to apply a character encoding to everythin.

To set the content for each response, you can use a filter that calls
response.setContentType("utf-8") before calling the next filter in the chain, and
map it to every request.

To set the default page encoding used for
all jsp files, use

<jsp-property-group>
  <url-pattern>/*</url-pattern>
  <page-encoding>utf-8</page-encoding>
</jsp-property-group>

To set the content-encoding of the error page generated by resin,
set the "user.language" system property, Resin will use that to
determine the encoding for the error page.
 
httpd.sh -Duser.language=ja

If you do not do not, Resin will use ISO-8859-1

Unfortunately, there is no locale that maps to utf-8.

(0000391)
sam   
08-10-05 00:00   
Ideally, the current <character-encoding> would establish the default for everything, and the various ways of overriding that would be well documented.
(0000392)
ferg   
08-10-05 00:00   
server/1971

The FileServlet now has a character-encoding parameter. Also the ErrorPageManager now looks at the character-encoding of the current context.