This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Java Character Encodint Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Java Character Encodint" Watch "Java Character Encodint" New topic
Author

Java Character Encodint

j_mcd
Greenhorn

Joined: Mar 21, 2001
Posts: 2
From Marcus Green site:
For reasons of compactness Java uses a system called UTF-8 for string literals, identifiers and other text within programs.
From Roberts, Heller:
Java uses two kinds of text representation:
Unicode for internal representation of characters and strings

I'm assuming one of these statements is incorrect. Could someone help?
Thanks!
Angela Lamb
Ranch Hand

Joined: Feb 22, 2001
Posts: 156
I may be wrong, but I think the Marcus Green quote is referring to the actual text of the Java code, while the RHE quote is talking about character and string variables within a program.
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
j_mcd,
Unicode is a 16-bit international character set standard which consists of a standard 8-bit subset that corresponds to the older ASCII and Latin-1 character sets (the ones most commonly used under DOS).
UTF-8 is the standard encoding name used to identify text stored as Unicode 8-bit characters. UTF-16 is the standard encoding name used to identify text stored as Unicode 16-bit characters.
If you use a Win/DOS based system, the source files you create will most likely be saved as 8-bit characters. Java translates these into 16-bit Unicode before processing the source file.
Hope that helps.
PS Please read the JavaRanch Name Policy
and re-register using a name that complies with the rules.
Thanks for your cooperation.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Character Encodint