Upside Down Question Mark Upside Down Exclamation
< return home

5. Unicode, HTML, and the Upside Down Exclamation

i) So how does Unicode fit in to our discussion of the two HTML numeric character references that can be used to represent the upside code exclamation (&#161; or &#xa1;)? Well, both of these HTML codes refer to the Unicode code point for the upside down exclamation point - which in conventional base 10 is 161!

ii) There are different ways of expressing 161. It can of course be expressed in base 10 decimal (161). It can also be refered to in hexadecimal or base 16. The hexadecimal representation of 161 is actually very common in the context of Unicode.

iii) When you convert 161 to hexadecimal (base 16) you get a1. Here's how you count in hexadecimal: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f. After you've exhausted those 16 digits, you combine digits to form a larger number. So after the number f, you have 10. But 10 in hexadecimal is actually 16 in decimal (base 10).

iv) The HTML code &#161; is straightforward - this refers to the Unicode code point of 161 in decimal. The # symbol just indicates that a number will follow. The &#xa1; refers to the same Unicode code point, but in hexadecimal. The #x indicates that the number to follow is in hexadecimal notion. The a1 is the actual hexadecimal number which is equivalent to the base 10 number 161.

Prev Next

Table of Contents

1. Using It: Copying / Pasting 2. Using It: Fonts & Encodings 3. Using It: HTML 4. Understanding Unicode 5. Unicode, HTML, and the Upside Down Exclamation 6. Purpose of the Upside Down Exclamation