There is a method called charCodeAt(position). But according to its documentation (and the console) it will return UTF8 code of a given character.
But I'd like to build a project basing on a single byte encoding (Windows 1251 in my case - Russian).
How can I calculate the code of a character in the encoding different to UTF8?