5. Unicode, HTML, and the Upside Down Question Mark
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 question mark (¿
or ¿
)? Well, both of these HTML codes refer to the Unicode code point for the upside down question mark - which in conventional base 10 is 191!
ii) There are different ways of expressing 191. It can of course be expressed in base 10 decimal (191). It can also be refered to in hexadecimal or base 16. The hexadecimal representation of 191 is actually very common in the context of Unicode.
iii) When you convert 191 to hexadecimal (base 16) you get bf. 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 ¿
is straightforward - this refers to the Unicode code point of 191 in decimal. The # symbol just indicates that a number will follow. The ¿
refers to the same Unicode code point, but in hexadecimal. The #x indicates that the number to follow is in hexadecimal notion. The bf is the actual hexadecimal number which is equivalent to the base 10 number 191.