?
Solved

Eclipse won't compile due to encoding issue

Posted on 2010-11-23
8
Medium Priority
?
484 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

718 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