Grails 3.0 encoding does not work outside the index.gsp

Asked

Viewed 75 times

2

I am creating a Grails project with version 3.0.4 and something strange occurs:

Two Gsps with the same content:

views > index.gsp:
views > Domain > show.gsp:

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

Upshot views > index.gsp:
çççççççç óóóó úúúúúú ááá´´aááááá´´a´´´ççççç

Upshot views > Domain > show.gsp:
�������� ���� ������ ��ᴴa����ᴴa��������

Does anyone understand why?

1 answer

0

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

Since Grails automatically created 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 I’m still getting used to. To change, just right-click the file and "file encoding", but recommend using the same encoding for the entire project: File > Setings > Editor > File Encodings

Browser other questions tagged

You are not signed in. Login or sign up in order to post.