Answer the question
In order to leave comments, you need to log in
Problem with JSON encoding, Android Studio?
I get JSON from a certain resource, I looked at the html source code, there is no encoding set there. As a result, I get diamonds with a question mark in the application when outputting text from this JSON. Is there some method or way to decode this? I'm trying URLEncoder, but it still doesn't work.
Answer the question
In order to leave comments, you need to log in
The encoding of the response text is set in the "Content-Type" http header, for example like this:
Content-Type: application/json; charset=utf8
or like this:
Content-Type: text/html; charset=windows-1251
I get JSON from a certain resource, I looked at the html source code, there is no encoding set there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question