Good afternoon!
The situation is this: there is an ajax request from jquery, which takes something and inserts it into the page. There is this same page with some kind of encoding.
Question: Is it possible to make sure that the answer returned by the Ajax always corresponds to the page encoding? (to avoid problems with the display of Russian characters)
That is, do so:
- take the
charsetvalue from the meta tag - send it in ajax request to the server
- on the server put the desired encoding in the response header
Question: Is this a normal way? What is the best way to determine the encoding of the page requesting the server: to transfer manually what you have learned through js or to watch the request headers or something?