0

this string is html content b'Katastr\\xc3\\xa1ln\\xc3\\xad mapa', that I need decode. I tried this str(htmlContent).encode('utf-8') but not succesfully.

str(htmlContent).encode('utf-8')

The result is still b'Katastr\\xc3\\xa1ln\\xc3\\xad mapa'

Vadim Kotov
  • 7,766
  • 8
  • 46
  • 61
Žanet
  • 66
  • 1
  • 6

1 Answers1

0

You need decode:

>>> b'Katastr\xc3\xa1ln\xc3\xad mapa'.decode(‘utf-8’)
Katastrální mapa
Dominic Price
  • 1,081
  • 8
  • 19