Unicode

Background problem:
Showhide code in wordpress behave unexpectedly.
Root cause: wrong quotation mark
Used (wrongly): ”
The right one: "

Let's dig in…

The right one: Quotation Mark (QM)
Spec from here (fileformat.info): https://www.fileformat.info/info/unicode/char/0022/index.htm
Unicode Data for: U+0022

BINARY
UTF-8: 00100010

HEX
UTF-8: 0x22 (22)
UTF-16: 0x0022 (0022)
UTF-32: 0x00000022 (0022)

Decimal
UTF-16: 34
UTF-32: 34

The wrong one: Right Double Quotation Mark (R-DQM)
Spec from here (fileformat.info): https://www.fileformat.info/info/unicode/char/201d/index.htm
Unicode Data for: U+201D
Name: Right Double Quotation Mark

BINARY
UTF-8: 11100010:10000000:10011101

HEX
UTF-8: 0xE2 0x80 0x9D (e2809d)
UTF-16: 0x201D (201d)
UTF-32: 0x0000201D (201d)

Decimal
UTF-16: 8,221
UTF-32: 8,221

Where to check unicode next time:

Yes:
– BEST: fileformat.info, unicode character search https://www.fileformat.info/info/unicode/char/search.htm
can search using the character, e.g., ” –> R-DQM, Character code (UTF-16 HEX) U+201D
– converter: https://r12a.github.io/app-conversion/
e.g.,
Character
U+hex : U+201D
– unicode symbols https://www.vertex42.com/ExcelTips/unicode-symbols.html 
search keyword: decimal, e.g., 8221
but can't search using hex, e.g., 201D

No:
– Wikipedia: https://en.wikipedia.org/wiki/List_of_Unicode_characters
why: the search box in the browser (Ctrl+F) cannot differentiate between " (QM) and ” (R-DQM)
– Unicode table: https://symbl.cc/en/unicode-table/#latin-extended-b
why: cannot find R-DQM / U+201D by using search keyword 201D or 8221
can scroll 201D though..

Next time:
– Wikipedia: Emoji in Unicode: https://en.wikipedia.org/wiki/Emoji#Unicode_blocks
– Unicode vs ASCII
e.g., ASCII for
QM: 34
R-DQM: 226 128 157 –> actually wrong because ASCII characters (127) & extended ASCII characters (255) are very limited (link).

Others:
https://www.compart.com/en/unicode/U+201D