|
[
Permlink
| « Hide
]
Shinsuke Sugaya added a comment - 13/Sep/06 07:22 AM
Attached patch.
Sorry for the late response on this ... I've been on the road a lot lately.
I agree that the current behavior (with respect to setting the content type) is broken. However, I have a concern about your patch. Won't the logic for getting the response character encoding from ExternalContext fail on a JSF 1.1 environment, where the method does not exist? Thinking further about this, it seems that the correct strategy should be to select the character encoding to use by the first match on the following list: * Character encoding embedded in the contentType that was passed to createResponseWriter(), if any. * Character encoding that has already been set for the response, if any. * Fall back to some reasonable default like UTF-8. Does that make sense? For ExternalContext#getResponseCharacterEncoding(), yes, it's not supported on JSF 1.1. So, in my patch, the encoding is called by getCharacterEncoding from response object.
For an encoding fallback order, I agree with you. Fixed in nightly build 20061119, and will be included in 1.0.4. Thanks for the patch!
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||