IDEA-100092 Eclipse compiler cannot handle UTF-8 chars

This commit is contained in:
Eugene Zhuravlev
2013-01-30 18:17:52 +01:00
parent f1c4823162
commit b4f327cffe
@@ -142,6 +142,14 @@ public class JavacMain {
try {
final Collection<String> _options = prepareOptions(options, nowUsingJavac);
// to be on the safe side, we'll have to apply all options _before_ calling any of manager's methods
// i.e. getJavaFileObjectsFromFiles()
// This way the manager will be properly initialized. Namely, the encoding will be set correctly
for (Iterator<String> iterator = _options.iterator(); iterator.hasNext(); ) {
fileManager.handleOption(iterator.next(), iterator);
}
final JavaCompiler.CompilationTask task = compiler.getTask(
out, fileManager, outConsumer, _options, null, fileManager.getJavaFileObjectsFromFiles(sources)
);