some chunk of code like this:
city_name = obj['city_from']['name'].encode('utf-8')
print(city_name)
The output from this code is:
b'\xd8\xa8\xd9\x86\xd8\xaf\xd8\xb1\xd8\xb9\xd8\xa8\xd8\xa7\xd8\xb3'
and if i remove encode('utf-8') output change like this:
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128)
this output language is persian(like arabic), i wonder why the string class in python3 does not have any decode method? Do you have any solutions to this problem?
thanks