Search code examples
pythonunicodecharacter-encodingiso-8859-1

Determine coding of text


I'm getting some weird characters as a response to a webpage. I'm pretty sure its a message in Russian language, but the coding seems to be all weird. The webpage info tells me the the encoding is ISO-8859-1. Here is the sample response.

Âû ñòðàíè÷êå ïðåâüþøêàìè

Is there a way to decrypt this response? Is the response salvageable at all.


Solution

  • It looks like the encoding is actually Cyrillic Windows-1251. Switch your web-browsers encoding accordingly.

    For example, the text you supplied in that encoding is:

    Вы страничке превьюшками

    which an auto-translation says means "You page previews".