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
  • 8,084
  • 8
  • 48
  • 62
Žanet
  • 64
  • 1
  • 1
  • 7

1 Answers1

0

You need decode:

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