• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to know the unicode coding for a specific char  RSS feed

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may also find useful info at http://www.unicode.org/charts/ .
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!