Can't change html charset

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Can't change html charset

İsmail Hakkı Ayaz

In my Grails-Vue application I build my vue client with Webpack and create index.html under src/main/webapp. When I deploy the application to tomcat 8, index.html's content-type comes as :

Content-Type: text/html;charset=ISO-8859-1

My UrlMappings is like this:
class UrlMappings {

    static mappings = {
       "/"(uri: "/index.html")

I have below configuration in my application.yml
            codec: html
            encoding: UTF-8
            htmlcodec: xml
                expression: html
                scriptlets: html
                taglib: none
                staticparts: none

I also created an Interceptor as the following :
class CharsetInterceptor {

    boolean before() {
        true }

    boolean after() { true }

    void afterView() {
        // no-op

I changed URIEnconding to 'UTF-8' in tomcat's server.xml. Still my views are not coming UTF-8 encoded. What should I do in order to make my client UTF-8 encoded ?

Thanks in advance.

You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit
For more options, visit