You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shale.apache.org by "Craig McClanahan (JIRA)" <ji...@apache.org> on 2006/09/25 09:33:31 UTC

[jira] Commented: (SHALE-282) ResponseFactory does not support a correct character encoding

    [ http://issues.apache.org/struts/browse/SHALE-282?page=comments#action_38259 ] 
            
Craig McClanahan commented on SHALE-282:
----------------------------------------

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?


> ResponseFactory does not support a correct character encoding
> -------------------------------------------------------------
>
>                 Key: SHALE-282
>                 URL: http://issues.apache.org/struts/browse/SHALE-282
>             Project: Shale
>          Issue Type: Bug
>          Components: Remoting
>    Affects Versions: 1.0.3
>         Environment: Solaris 10, Java5
>            Reporter: Shinsuke Sugaya
>         Assigned To: Craig McClanahan
>         Attachments: FixCharsetIssue.patch
>
>
> I got ? character on "New Style Remoting Support" when I put Japanese resource bundle, Bundle_ja.properties, in usecases sample. The cause seems that ResponseFactory sets null as an encoding of ResponseWriter.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira