A
A
Alexey Yarkov2015-11-08 19:02:35
JavaScript
Alexey Yarkov, 2015-11-08 19:02:35

Why is one Cyrillic letter not displayed?

We have a chrome extension that loads JSON from the site and displays it in an HTML window. But here's the problem: the Russian letter is not displayed ((
In the extension, I add HTML like this:

$("#adress").html(data[0].location.country+", "+data[0].location.state+", г. "+data[0].location.city+", "+data[0].location.street);

Pay attention to the letter "g".
We see the result on the screen. The letter "g" is replaced by "Pi".
Everything is fine with the encoding (UTF-8 without BOM)
Screen:
5dc0e99690bf42ff8f20b64b7875c339.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
profesor08, 2015-11-08
@profesor08

  1. It would be nice to see the json itself
    console log(data);
    Shows you the real content.

T
twobomb, 2015-11-08
@twobomb

You have something with json, I created an approximate object that should be there and everything outputs fine. https://jsfiddle.net/twobomb/nhy9gfm0/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question