The function returns places in radius using the Google Places API. To be exact, I use this library to handle the task.
The problem is that cyrillic symbols are shown like this:
ÐО Сбербанк РоÑÑии, КиевÑкое отделение â„–14
I tried these suggestions. I also tried this:
pname = place.name
uni = unicode(place.name)
And this:
convertedname = pname.encode(encoding='UTF-8', errors='strict')
Nothing helped. What else can I try?
That's UTF-8. If your output terminal is set up for UTF-8, you should basically need no encoding or decoding at all. But the proper way to read that string is to use
string.decode('utf-8')
to turn it into a proper Unicode string, then encode it before output to whatever encoding your terminal supports (looks vaguely like ... code page 1250 or iso-8859-2?).https://tripleee.github.io/8bit#0xd0 shows 208 (0xD0) being mapped to Đ in six different encodings, so I conjecture that you are using one of those. The rest is speculation on my part.
So, basically,
Apparently, you also need to encode it to some suitable output encoding for your console, or set up your console to properly support UTF-8. If indeed your terminal is presently set up for cp1250, it does not support Cyrillic output at all.