| Author |
how to know the unicode coding for a specific char
|
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3400
|
|
Hi all. how can I get the unicode coding for a specific char. something like (for example): A = \u2302 c = \u233a is there an algorithm to apply here ?
|
 |
Mike Stepp
Greenhorn
Joined: Jul 02, 2004
Posts: 3
|
|
The unicode is in hex, so you just need to convert your char to hex, then write out "\u####". You could do this: "\u"+Integer.toHexString((int)mychar); (this might actually require some padding 0's on the left, but you get the idea).
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
Windows only: run the "charmap" utility. (BTW: what are you trying to achieve here - code point values don't change so isn't this a little unecessary? Sorry if that sounds like a criticism - I'm just curious) [ July 05, 2004: Message edited by: Paul Sturrock ]
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
|
|
|
You may also find useful info at http://www.unicode.org/charts/ .
|
"I'm not back." - Bill Harding, Twister
|
 |
 |
|
|
subject: how to know the unicode coding for a specific char
|
|
|