It is required to read the text from the file and translate it into Unicode. I do this by character charCodeAt . The problem is that this function seems to see all Russian letters in the same way, that is, 'а'.charCodeAt() and 'Я'.charCodeAt() equally return 65533 . I tried various functions from the Internet such as
function ord(str){ var ch = str.charCodeAt(0); if (ch>0xFF) ch-=0x350; return ch; } And always for different Russian letters on an exit identical values turn out. I tried to take Russian characters from the text and insert it into console.log(); as a result, I see question marks "?" instead of Russian letters in the console. I'm not very strong in encodings, tell me, please, how should I do it right?
U+FFFD(65533) there is a Replacement Character (z). Also a question mark?There is a common replacement character for some fonts. We need to add a minimal reproducible example . File coding, code snippet file reading, ... - JosefZ