This page shows you how to make the difference between two characters that are really visually similar.
Are this two characters the same ?
let codePoint = character.charCodeAt(0).toString(16)
- The first one is a dash cldr/utility/character.jsp
Bash with Hexdump Solution
Diff between Characters with an hex tool such as hexdump on Unix that output hexadecimal digits
- The Character Set is UTF8. We got then hexadecimal in UTF8.
- The Hexadecimal in UTF8 of the first character is e2 80 93. It corresponds to the unicode character 2013 - EN DASH. See Translation of a UTF-8 Multibyte sequence to Unicode - Example 2. 0a is the end of file.
echo – | hexdump -C
00000000 e2 80 93 0a |....| 00000004
- The Hexadecimal in UTF8 of the first character is 2d. This is the unicode character 2d - Hyphen Minus
echo - | hexdump -C
00000000 2d 0a |-.| 00000002