Solved

Eclipse won't compile due to encoding issue

Posted on 2010-11-23
8
475 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 25 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 25 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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…
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 explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

756 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