• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 497
  • Last Modified:

Eclipse won't compile due to encoding issue

Hi, I have a number of .java files which contain such characters as '。', stopping the eclipse compiler from compiling the files.

How can I solve this issue?

Thanks.
0
wsyy
Asked:
wsyy
2 Solutions
 
CEHJCommented:
Preferences>General>Workspace and select the right encoding
0
 
CEHJCommented:
If you're not sure which, try utf-8
0
 
objectsCommented:
right click on the file and select Properties
goto Text file encoding in Respource section, check "Other" and select the appropriate encoding (probably UTF8)
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
objectsCommented:
the other alternative is to use native2ascii to encode the strings
and by moving them into properties files makes it easier to manage
there a good plugin that handles the conversion for you
http://propedit.sourceforge.jp/index_en.html
0
 
techsathishCommented:
String str = "va'l";
URLEncoder.encode(str, "ISO-8859-1");

Use like above example to encode the character and use it..
0
 
CEHJCommented:
>>the other alternative is to use native2ascii to encode the strings

That's not for setting the encoding of source code. You need to set the encoding for the whole editor
0
 
wsyyAuthor Commented:
Thank you all.
0
 
CEHJCommented:
:)
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now