Eclipse won't compile due to encoding issue

Posted on 2010-11-23
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?

Question by:wsyy
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
LVL 86

Accepted Solution

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

Expert Comment

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

Assisted Solution

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)
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

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

Expert Comment

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

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

Expert Comment

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

Author Closing Comment

ID: 34205595
Thank you all.
LVL 86

Expert Comment

ID: 34207401

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