I have UTF-8 string literals hardcoded in my java files. Eclipse builds this application correctly, so resulting class files contains those strings in UTF-8. But If use ant build.xml, resulting class files contains strings with incorrect encoding.
I already tried adding encoding="UTF-8" to the javac task, but with no success.
How it can be fixed?
p.s. I know this is quite bad practice to have string literals hardcoded in the source files, but this is situation when I need it there, so please don't suggest to extract it to the resource bundle.
Any help is greatly appreciated