I am reading a first and last name in Python from a file and am having trouble with encoding. I want to print out the name, but am getting "UnicodeEncodeError: 'charmap' codec can't encode character '\u021b' in position 11: character maps to undefined" with this code:
first = obj.first_name.encode('utf-8')
last = obj.last_name.encode('utf-8')
first = first.decode('utf-8')
last = last.decode('utf-8')
print(first)
What is the problem?