Finding the hex code of a character when you don’t have a hex editor at hand (but you have Visual Studio or Word)

Posted: (EET/GMT+2)

 

Well, sometimes, you need to find out the hex, ASCII or Unicode character code of a character you have. This might be a special character in particular font, or a character in Windings or Webdings, or anything the like. And most often, this need arises when you are far away from your favorite text editor.

How would you solve the problem if you had Visual Studio available? This is easy: save the text or character into a file, add the file to any solution you have, and right-click the file in Solution Explorer, choose "Open With" and then select Binary Editor. You now have a hex editor in from of you. (You can also hit Ctrl+N to create a new file, and click the small arrow next to the Open button to select the same Binary Editor.)

But what if you only had Word? In this case, getting the hex character code is even faster, but less-known: type or paste in the character you are interested at, and then press Alt+X. This key combination converts the character on the left of the blinking caret to a four-digit Unicode code point value. For instance, if you typed the letter "K", pressing Alt+X would replace the letter with 004B, which would stand for 4Bh or 75 in decimal. Super-easy! (Note that the character you converted is gone; to get it back, simply undo.)

Finally, a reminder on the Alt+X key combination: you can use it the other way around, too. Type in any Unicode hex code point value in three or four digits, press Alt+X, and you have your letter printed out. I've blogged on this before, so I'm not going into details, but this serves as a good refresher. For example, to get the almost-equal sign in Word, type in "2248", and press Alt+X. There you have it: .

Good luck!