0

I am translating text with Google Translate API using Python. I have a problem the characters returned, for example I have " instead of ".

How can I resolve that?

Laurel
  • 5,965
  • 14
  • 31
  • 57
  • Does this answer your question? [Decode HTML entities in Python string?](https://stackoverflow.com/questions/2087370/decode-html-entities-in-python-string) – Laurel Aug 10 '20 at 14:05

1 Answers1

0

You can use html.unescape method

For instance:

from html import unescape

if __name__ == '__main__':
    converted = unescape('"')
    print(converted)

Output:

"
Ahmet
  • 7,527
  • 3
  • 23
  • 47