aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes UTF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "UTF" Watch "UTF" New topic
Author

UTF

wei liu
Ranch Hand

Joined: Dec 06, 2001
Posts: 56
Java uses a system called UTF for I/O to support international character sets
what does UTF mean? could anyone give me a clear idea?
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

You are right re java using UTF.
UTF apparently stands for UCS Transformation Format.
If you refer to the documentation on the DataInputStream
class using the API, this is part of what it says....

Data input streams and data output streams represent Unicode strings in a format that is a slight modification of UTF-8. (For more information, see X/Open Company Ltd., "File System Safe UCS Transformation Format (FSS_UTF)", X/Open Preliminary Specification, Document Number: P316. This information also appears in ISO/IEC 10646, Annex P.)

So if you are really interested, you might want to dig into the
document mentioned above.
But for the purposes of Java it is necessary (maynot be sufficient) to understand that the strings are represented
as Unicode and that
All characters in the range '\u0001' to '\u007F' are represented by a single byte.
The null character '\u0000' and characters in the range '\u0080' to '\u07FF' are represented by a pair of bytes.
Characters in the range '\u0800' to '\uFFFF' are represented by three bytes.
The multi-byte chars are used for most of the Asian languages.
English uses single byte chars (7-bit). Most European languages
use single byte chars (8-bit). This is how I18N is achieved
in java.

regds.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UTF