aspose file tools*
The moose likes Java in General and the fly likes UTF 8 or Unicode? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "UTF 8 or Unicode?" Watch "UTF 8 or Unicode?" New topic
Author

UTF 8 or Unicode?

Dan Temple
Ranch Hand

Joined: Jul 10, 2001
Posts: 93
I have read from one source that Java uses UTF 8 to internally represent variables and such. But another source claims that it uses Unicode. What is the real story?
Thanks in advance
Dan
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
It uses both in different places. For class files it uses UTF-8 representations, as per the JVM spec, and in runtime memory it generally uses straight Unicode (which is not really specified anywhere, it's just easiest, given that you need to be able to return a Unicode value for the charAt() method.)


"I'm not back." - Bill Harding, Twister
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UTF 8 or Unicode?
 
Similar Threads
File Encoding
Character Encoding
Character Set for Arabic and English
displaying unicode in JSP
problem inserting arabic data