3
In my javascript file there is a message with the string "service" for example. When I run the project (run-app) and check the javascript by the browser, the word appears as: "§the service". But this is displayed correctly on the screen when the message is invoked.
But when I run the system through a generated package (package), and check the javascript by the browser, the word appears as: "servi u00c3 u00a7o". When the message appears on the screen, it is displayed: "service§the"
I found a person with the same problem as mine, on that link: https://github.com/bertramdev/grails-asset-pipeline/issues/322
However the solution of using "-Dfile.encoding=UTF-8" did not work for me.
I tried with the commands below and nothing:
grails -Dfile.encoding=UTF-8 package
Gradle -Dfile.encoding=UTF-8 assetCompile
It doesn’t make much sense in my case, because the encoding error is in javascript and not in the return of requests.
– Victor Soares
Guy takes a look at the enconding from Sponse, and sees if that’s not it, if that’s not it, provençally is the file’s enconding, have you set it in your IDE.
– Leonardo Villela
No friend, it has no relation to Sponse and has no problem in the file encoding. As I described in doubt, the system works normally, the problem occurs only when the package is generated (because javascript is minimized in a single file)
– Victor Soares
Hm..., you have checked the Respse encoding of this js file?
– Leonardo Villela
yes it is UTF-8 as the rest of the files.
– Victor Soares