-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTF-8 Javascript corrupted when being served #63
Comments
we have to merge into one unified character encoding. Typically its safe to use UTF-8 as the encoding because ANSI is compatible with UTF-8. |
Figured out the actual issue. The files were encoded properly but the response encoding was not being set. The response encoding needs to be set to request.characterEncoding then the issue is resolved. |
Issue is resolved in version 1.5.5 |
Wow your response is quick, thank you! |
This issue is similar to issue #62, except it happens in production mode (or non-development mode).
I am not sure if the same thing will happen on other assets (e.g. CSS).
In my case, I have two js file:
I have read through the code and found that in production mode, the explicitly defined charset in the asset: tag for application.js will not proporgatr to all required files, and therefore the moment-with-langs.js file will not have an encoding value passed (I found it by adding debug output).
Furthermore, the asset code will not properly read the required files using UTF-8, and in the AssetsController, there is no means to specify the character encoding to use when I am trying to fix issue 62.
This also make me thinks that, what if the js/CSS files to serve may not be necessary all in UTF-8 encoding?
The text was updated successfully, but these errors were encountered: