KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am developing a maven based web project. In my web module I am using different language specific resource bundles (german, spain, ....). All my sources are based on UTF-8 and erverything works fine. Now it was necessary to acitvate maven resouce filtering to replace some configurations depending on different maven profiles. my pom.xml: ..... <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> ..... <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <build> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> .... From this moment my war file contains resource bundles with wrong encoding. For example German umlauts are no longer displayed in my web application correctly. When I disable the resource filtering everything is well again. The only solution I found was to set the property project.build.sourceEncoding to 'ISO-8859-1' <properties> <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding> </properties> But I can not understand why this is necessary? All my sources are UTF-8 and also my application is based on UTF-8? What will happen if I need to add a resource bundle with - for example Japanese characters? I am developing on linux using Eclipse 4.2 and Maven 3
Tags (comma-separated)
Save Edits
Cancel