I have a Java project in Linux with Eclipse as IDE. I just pull the project from SVN onto my windows 7 machine. I was surprised that I got lots of this:
error: unmappable character for encoding GBK
Some of the characters in the comments are not readable anymore. I corrected these character but I still got above error even these comments are readable again.
I notice Eclipse use utf-8 in my Linux (Fedora 20) and GBK in my Windows. My questions are the following:
- should I use the same encoding in both systems? if yes, utf-8 or GBK?
- how to make my code compilable in windows by a batch action? There are many files and I don't want to do it one by one.
- how avoid this happen again in the future?
EDIT:
I got the same error when I use ant to build. After I changed my windows eclipse default encoding to utf-8, I still got the same error. I may need conversion?
EDIT2:
After the change of Eclipse it works now. But the ant still give me the same error.
EDIT3:
for the ant issue, found the solution here: "unmappable character for encoding" warning in Java