Javascript charCodeAt and fromCharCode not returning the same value

Viewed 73

I have a Unicode character that works with a very specific font.

I need to take that character's code, add 8, and convert it back to a string.

Here's python code that works:

char = ""
char == chr(ord(char)) # True

However, in Javascript, using the matching functions, it does not convert back correctly:

const char = "";
char == String.fromCharCode("".charCodeAt(0)) // false
1 Answers
Related