Skip to main content
edited tags
Link
thefourtheye
  • 237.9k
  • 52
  • 464
  • 499
Source Link
StealthRT
  • 10.3k
  • 40
  • 190
  • 356

Javascript character (ASCII) to Hex

Hey all i am in need of something simple to convert character(s) into ASCII and then make that into a Hex code.

So as an example the "A" character would be:

0xF100 + ascii_code = Hex

and that would turn out to be:

0xF100 + 65 = 0xF141

65 would be the character "A" above. I've been looking for some javascript that would take my character and make a Hex from it... But i haven't really found anything that would do this....

Any help would be great!