Richard O. Hammer wrote:

Ramanand Achanta wrote:

How can I  convert the
          String unicodeString = "\\u25b5";
to
          char unicodeChar = '\u25b5';     // Result

I think you have made a mistake in writing "\\u25b5", since that represents six unicode characters and not one. You must mean "\u25b5" instead.


You could say
   String unicodeString = "\u25b5";
   char unicodeChar = unicodeString.charAt(0);

Hmmm. I assumed that the OP was asking for a way to get from those 7 characters to the
Unicode character they describe. Imagine parsing a string that has escaped Unicode
sequences in it, for example.


Ramanand, have you looked at CharSet and CharSetDecoder? If you parse the "25b5"
into a byte[], those may be what you need.


Grant

--
_________________________________________________________________________
"In theory, there is no difference between theory and practice. In practice, there is no relationship between theory and practice."



_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to