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

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

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
         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

        

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

Posted by "Shinsuke Sugaya (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/SHALE-282?page=all ]

Shinsuke Sugaya updated SHALE-282:
----------------------------------

    Attachment: FixCharsetIssue.patch

Attached patch.

> 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
>         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

        

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

Posted by "Craig McClanahan (JIRA)" <ji...@apache.org>.
    [ 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

        

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

Posted by "Shinsuke Sugaya (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/SHALE-282?page=comments#action_38352 ] 
            
Shinsuke Sugaya commented on SHALE-282:
---------------------------------------

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.

> 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

        

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

Posted by "Craig McClanahan (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/SHALE-282?page=all ]

Craig McClanahan resolved SHALE-282.
------------------------------------

    Fix Version/s: 1.0.4-SNAPSHOT
       Resolution: Fixed

Fixed in nightly build 20061119, and will be included in 1.0.4.  Thanks for the patch!


> 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
>             Fix For: 1.0.4-SNAPSHOT
>
>         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

        

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

Posted by "Craig McClanahan (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/SHALE-282?page=all ]

Craig McClanahan reassigned SHALE-282:
--------------------------------------

    Assignee: Craig McClanahan

> 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