Tell me, how can the numerical value of a symbol in the table CP-1251 be converted into a symbol? For example, 224 in the letter "a"?

  • one
    Respect for O_o - Oleg Arkhipov
  • mb alert (String.fromCharCode (224))? - Dobby007
  • @Dobby007, no. UTF-16. - karmadro4
  • I tried to use it, the symbols are unknown, not the letter “a”, but a symbol with a dash at the top, instead of “b” with two dashes - Irina
  • what other options ??? write - Irina

1 answer 1

You just need to move the unicode table to the appropriate page. Determined empirically.

function ord_1251(ch) { var num = ch.charCodeAt(0)-0x350; return num; } function chr_1251(num) { var ch = String.fromCharCode(num + 0x350); return ch; } 
  • I will try, thanks - Irina
  • everything works well), - Irina