Grails 3.0 encoding does not work outside of index.gsp

2

I'm creating a Grails project with version 3.0.4 and something strange happens:

Two GSPs with the same content:

views > index.gsp:
views > domain > show.gsp:

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
çççççççç óóóó úúúúúú ááá´´aááááá´´a´´´ççççç
    </body>
</html>

Result views > index.gsp:
ççççççççççóóóúúúúúú ááá''aááááá''a''ççççç

Result views > domain > show.gsp:
ᴴa ᴴa

Does anyone understand why?

    
asked by anonymous 10.09.2015 / 05:04

1 answer

0

It was a simple problem indeed. Just set up the encoding of the gsp file.

As Grails automatically created the index.gsp for me, it has already configured the file as UTF-8. And the ones I created were automatically for another encoding.

In my case it's IntelliJ that I'm getting used to yet. To change, just right click on the file and "file encoding", but I recommend using the same encoding for the whole project: File > Setings > Editor > File Encodings

    
11.09.2015 / 18:41