I can't properly encode and decode a string that contains single and double quotation marks. Note: I need to show quotation marks.
I saved following string in a txt file.
Here’s their mantra: “Eat less and exercise more. The secret to weight loss is energy balance. There are no good or bad calories. It’s all about moderation.”
with open ("file.txt", "r") as myfile:
data = myfile.read()
myfile.close()
print data
the result:

HereΓÇÖs their mantra: ΓÇ£Eat less and exercise more. The secret to weight loss is energy balance. There are no good or bad calories. ItΓÇÖs all about moderation.ΓÇ¥
I can fully omit quotation marks, but I need to show them
print data.decode('ascii', 'ignore')
Heres their mantra: Eat less and exercise more. The secret to weight loss is energy balance. There are no good or bad calories. Its all about moderation.
print json.dumps(data)
"\ufeff\nHere\u2019s their mantra: \u201cEat less and exercise more. The secret to weight loss is energy balance. There are no good or bad calories. It\u2019s all about moderation.\u201d "