• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Character Encodint

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic