In an attempt to move into the field of enterprise application
development I started refreshing my Java recently. I was going
through a well known book when I stumbled upon the
implementation of Strings in Java. I have high esteem for the
developers at Sun, but I really could not digest the fact that
Sun engineers thought 2 bytes would be enough for characters. It
was kind of Y2kish. Now that the UTF has grown above the usual
number 16 bits can represent I was eager to find how Sun tackled
this problem. The book touched the matter vaguely but since that
didn’t completely clear my doubts I decided to investigate. And
these are my findings. Before we dive into the Java
implementation of the standard, we should understand what UTF
is. At least some of us might have seen it somewhere. May be
those of us who have the creepy behavior of going through the
source of an HTML page might have seen the following, <meta
http-equiv="Content-Type" content="text/html; charset=utf-8" />.
And we may have a vague idea on what i