I am writing a project, which can read Japanese characters from file and do an output of those Chars, and works just fine.
Problem is, when I change it to a maven (Using Maven 3.03) projects… and have every jars in maven dependency, then run my project, I found every single Japanese Char messed up.
For Example, I have got outputs like:
����
I guess that’s because the maven encoding properties, so I tried to make this change
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputencoding>UTF-8</project.reporting.outputencoding>
</properties>
In which I changed the default project.reporting.outputencoding property to UTF-8. I made this change because someone said it works for Maven 2.X but maybe not for Maven 3.X… and actually it doesn’t work at all.
So I hope there’s somebody can help me figure out how to set the properties and have the proper output?
Thank you
Sounds like Maven is filtering your properties files without the correct character encoding.
You may need to tell the Maven process resource plug-in to use UTF-8 encoding while processing resources. Instructions for that are here:
http://maven.apache.org/plugins/maven-resources-plugin/examples/encoding.html