How the coding works and the symbol table



  • For example, in HTML, the Windows-1251 code (kirillian) inserts the line Egor and the JavaScript means the code of that symbol:

    var str = 'Егор';
    str.charCodeAt(0);//1056
    

    Result 1056♪ I'll see. http://pascal.net.ru/1251 I can't figure out where this code came from.

    I'm looking for information, all over the tables, and the basic concepts (what coding is).

    Question: How is this all interrelated and working?



  • Order.

    1. Reading theory of function https://learn.javascript.ru/string Find out the following:

    All rows have an internal code for Yunikod.

    It doesn't matter what language the page says, if it's in. windows-1251 or utf-8. Inside JavaScript-interpreter all lines Reference is made to a single " unique " . Each symbol corresponds Your code.

    Next.

    1. Examining the Junicoda table itself and its organization ( useful: https://ru.wikipedia.org/wiki/%D0%9A%D0%B8%D1%80%D0%B8%D0%BB%D0%BB%D0%B8%D1%86%D0%B0_%D0%B2_%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%D0%B5 ♪ http://unicode-table.com/ru/#greek-coptic We'll find out that the symbol of the Cyrillic letter "E" is U+0415 (0x415 in the sixteenth system).

    2. All above are confirmed by the function "Е".charCodeAt(0)which gives 1045Not 1056 I don't know. 1045 (dec) = 415 (hex)

    3. We'll see the row coding table. 0410 and pole 5♪ At the intersection, there's our letter. Е

    alert("Егор".charCodeAt(0));




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2