Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Eclipse won't compile due to encoding issue

Posted on 2010-11-23
8
Medium Priority
?
494 Views
Last Modified: 2012-05-10
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
Comment
Question by:wsyy
8 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 100 total points
ID: 34201959
Preferences>General>Workspace and select the right encoding
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34201962
If you're not sure which, try utf-8
0
 
LVL 92

Assisted Solution

by:objects
objects earned 100 total points
ID: 34202002
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Expert Comment

by:objects
ID: 34202162
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
 
LVL 7

Expert Comment

by:techsathish
ID: 34204119
String str = "va'l";
URLEncoder.encode(str, "ISO-8859-1");

Use like above example to encode the character and use it..
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34204151
>>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
 

Author Closing Comment

by:wsyy
ID: 34205595
Thank you all.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34207401
:)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question