[ 
https://issues.apache.org/jira/browse/WW-5100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17240525#comment-17240525
 ] 

xue commented on WW-5100:
-------------------------

Hi, Lukasz, 

Actually my application is just loading some js script for display usage which 
is html5 component. 

And before upgrading to 2.5, the 'Network' table in Chrome Content-Type: 
application/javascript, which means the charset is 'utf-8' by default, but 
after upgrading it goes to application/script;charset=charset=ISO-8859-1, and 
as the result, some js such as non-ASCII characters related to the definition 
of Pi.
var π = Math.PI, ε = 1e-6 cannot be loaded. 

So my question is where and how the struts change the encoding? and why?

And for your question, no there is no plugin, no filter about encoding, and no 
special configuration in struts.xml. 

Thanks, 

Helen

> incorrect content-type behavior after upgrading to struts 2.5.*
> ---------------------------------------------------------------
>
>                 Key: WW-5100
>                 URL: https://issues.apache.org/jira/browse/WW-5100
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5.22
>         Environment: Windows
>            Reporter: xue
>            Priority: Blocker
>              Labels: features
>             Fix For: 2.6
>
>
> 1. After upgrading from struts 2.3.* to struts 2.5.22, the content-type 
> header of the response will changed to 
> "application/script;charset=charset=ISO-8859-1" which was 
> "application/script" in struts 2.3.4.
> Which caused our application failed, as it should be default as UTF-8. 
> 2. When specifying the charset in Content-type with struts filer, the 
> Content-Type is change to "application/script;charset=charset=UTF-8", but 
> UTF-8 encoded file can still not be loaded correctly. 
> It is blocker issue, which fails our application after upgrading.
> Please help to explain and provide solution, thanks, 
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to