0

I try import a project created by eclipse into intellij idea, and I have setted the file encode to UTF-8 in both eclipse and intellij idea, like this:

enter image description here

But there are all messy codes when I open a java file in intellij idea, like this: enter image description here What makes me confused is the xml file works well, no messy code as I considered.

Who can tell me what can I do to fix this case?

greg-449
  • 109,219
  • 232
  • 102
  • 145
yinhao
  • 1
  • That doesn't look like a Java file at all, even with incorrect encoding it would not look as bad as that. – greg-449 May 17 '16 at 08:52
  • What does the `SecondTest.java` file look like in Eclipse? – Rob Audenaerde May 17 '16 at 08:57
  • Hi, @RobAu, the SecondTest.java file in Eclipse works well as usual. package com.mew; public class SecondTest { public static void main(String[] args) { System.out.println("Hello, second"); } } Sorry, I don't konw how to show you pictures in comments. – yinhao May 17 '16 at 09:19
  • Thanks for your attention, @greg-449. But it's true. All I had done is import a project created by Eclipse and then open a java file. – yinhao May 17 '16 at 09:23
  • Can you right click the file in Eclipse to verify it uses UTF-8 encoding? (Right click in Project explorer -> Properties) – Rob Audenaerde May 17 '16 at 09:50
  • Hi, @RobAu. Unbelieveable, I think it's because of a security software which is installed claimed by my company. Sorry to bother you. – yinhao May 18 '16 at 03:09

0 Answers0