Smart questions
Smart answers
Smart people
Join Tek-Tips Forums

Member Login

Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Java7u3: error: unmappable character for encoding ASCII

rach18 (Programmer) (OP)
19 Mar 12 5:28

My java program has a comment line as follows:

//Go on to the DMS Table LENLINES ~V Single Line Requirement.

While compiling using /usr/java/jdk1.7.0_03/bin/javac, i get the following error:

error: unmappable character for encoding ASCII //Go on to the DMS Table LENLINES ? Single Line Requirement.

It seems that the compiler is not ignoring the comments and the special characters in comments are the issue.
Please let me what the problem is and how can it be overcome?

tom62 (Programmer)
20 Mar 12 4:10
The compiler doesn't understand the special character "~" in your comment. Most likely, you're "telling" javac to expect source files in UTF-8, when they're really in a single-byte encoding like ISO-8859-1 or windows-1252.
Diancecht (Programmer)
21 Mar 12 4:22
It's not compiling the comment. The compiler needs to read the whole file, even the comment lines, as it needs to know where the comments ends to keep compiling.

The easy way to solve it is removing the character.


Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close