0

Inavlid Character error in eclipse on docker

I have created a container using file similar to https://github.com/batmat/docker-eclipse/blob/master/Dockerfile on docker installed on windows 7.I did need to make a change of setting the locale first in dockerfile. I tried with both en_US.UTF8 and en_IN.UTF8.

When I start the container I am successfully able to open the eclipse in xming but eclipse is giving invalid character error on double quotes.(Probably on some other characters)

Is there any other change/setting I need to do?

Suhas Kumar
  • 41
  • 1
  • 8

1 Answers1

0

This does not look like a file encoding problem (because the syntax error is not displayed at the first character), but that instead of ASCII quotation marks (") similar looking characters (e. g. ", ײ, ״, ʺ, etc.) were used.

Replace line 17 with the following line:

System.out.println("Hello There");

See also: Java Language Specification - 3.10.5. String Literals

howlger
  • 31,050
  • 11
  • 59
  • 99
  • Right! That is a part of my question. Normally I am using eclipse on windows and don't have any such issues.However When I type the double quotes in eclipse on docker using xming it gets replaced with this character. I had encoding error coming initially and after adding UTF locale to dockerfile, the error didn't come but my typed character (double quotes) is not proper.Any suggestions? – Suhas Kumar May 28 '18 at 06:40
  • Does copying and pasting work? I don't think the wrong autocorrect of quotes happens in Eclipse. Which quotation marks do you get in other editors via Xming? – howlger May 28 '18 at 06:56
  • Yes that should work. The problem is the characters entered from keyboard into eclipse is not correct. As you mentioned It enters similar looking character rather than double quotes. – Suhas Kumar May 28 '18 at 10:28
  • Is this just the case with Eclipse or also with other editors and in the terminal via Xming? – howlger May 28 '18 at 11:37