Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 10-01-2009
Member
 
Join Date: Nov 2008
Posts: 98
Problem of accents in Java?

Hello, I just installed the JDK 6 update 11 on my pc.
When I write a program and I met for example:

System.out.println (i + "Measure in kilometres");

St accents replaced with bizarre characters and cedillas too. Yet I installed Multilanguage Pack How to fix this problem?
Reply With Quote
  #2  
Old 10-01-2009
Member
 
Join Date: May 2008
Posts: 115
Re: Problem of accents in Java?

It is a concern for charset in your files. Java and javac compiler.

Your file. Java is recorded in a charset (probably UTF-8), and javac think it is registered in another (probably Latin-1).

Two possibilities:
- Register your. Java in Latin-1 (also known as ISO-8859-1) instead of utf-8.
- Javac say that the source files are in utf-8. (javac-encoding utf8 MaClasse.java)
Reply With Quote
  #3  
Old 10-01-2009
Member
 
Join Date: Nov 2008
Posts: 98
Re: Problem of accents in Java?

Quote:
Originally Posted by JoeFrat View Post
It is a concern for charset in your files. Java and javac compiler.

Your file. Java is recorded in a charset (probably UTF-8), and javac think it is registered in another (probably Latin-1).

Two possibilities:
- Register your. Java in Latin-1 (also known as ISO-8859-1) instead of utf-8.
- Javac say that the source files are in utf-8. (javac-encoding utf8 MaClasse.java)
The command-encoding utf8-warning puts me and when I run the program there are always signs to place accents and the file is coded in ANSI and I do not have the option to record in Latin-1.
I work with Notepad + +.
Reply With Quote
  #4  
Old 10-01-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: Problem of accents in Java?

Quote:
Originally Posted by JoeFrat View Post
It is a concern for charset in your files. Java and javac compiler.

Your file. Java is recorded in a charset (probably UTF-8), and javac think it is registered in another (probably Latin-1).

Two possibilities:
- Register your. Java in Latin-1 (also known as ISO-8859-1) instead of utf-8.
- Javac say that the source files are in utf-8. (javac-encoding utf8 MaClasse.java)
The response above is actually a solution But for more security you can also use the program which will transform native2ascii accents in coding intermediary (eg becomes \ u00e8). This is especially useful if you provided your sources to someone else who does not have the same editor you: imagine that your publisher or UTF8
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Problem of accents in Java?"
Thread Thread Starter Forum Replies Last Post
Need Spanish accents in Windows 7 Neel Kamal55 Operating Systems 3 04-12-2010 01:16 AM
Java JDK problem Samara Software Development 6 19-07-2010 01:02 PM
Texmaker removes all accents Aaliya Seth Windows Software 5 20-01-2010 02:31 PM
Square instead of accents AZUL Software Development 4 04-12-2009 04:28 PM
Problem With Java Kusagra Software Development 2 17-03-2009 11:46 PM


All times are GMT +5.5. The time now is 04:27 AM.