Fetching URL and converting to UTF-8 Python
<p>I would like to do my first project in python but I have problem with coding. When I fetch data it shows coded letters instead of my native letters, for example '\xc4\x87' instead of 'ć'. The code is below:</p>

<pre><code>import urllib.request
import sys

page = urllib.request.urlopen("http://olx.pl/")
test = page.read()

print(test)
print(sys.stdin.encoding)
z = "ł"
print(z)
print(z.encode("utf-8"))
</code></pre>

<p>I know that code here is poor but I tried many options to change encoding. I wrote z = "ł" to check if it can print any 'special' letter and it shows. I tried to encode it and it works also as it should. Sys.stdin.encoding shows cp852. </p>