简体   繁体   中英

Appengine with springboot doesn't serve static files with UTF-8

I have this website made with Angular that I'm trying to serve. When doing it just with Springboot and Maven I have no problem. The webpage is encoded correctly with UTF-8. Now I'm trying to serve the page with Google Appengine and Springboot and it gets served without UTF-8.

In my pom.xml I have this line

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

And in the app engine-web.xml

<system-properties>
    <property name="java.util.logging.config.file" value="WEB-INF/logging.properties" />
    <property name="file.encoding" value="UTF-8" />
    <property name="DEFAULT_ENCODING" value="UTF-8" />
</system-properties>

I'm still learning all of this but it feels like everything should be served with UTF-8.

Are you sure that

  1. You don't have any ISO-8859-1 characters on the page, and
  2. The static HTML includes <meta charset="UTF-8"> (HTML5) or <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> (otherwise)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM