# -*- coding: utf-8 -*-
import urllib.request as request
import re
url = "http://jjo.kr/users/38281748"
raw_data = request.urlopen(url).read() #Bytes
decoded = raw_data.decode("utf-8")
print(decoded)
I was trying to get HTML info about that url, but I got error messages.
UnicodeEncodeError: 'cp949' codec can't encode character '\ufeff' in position 2313: illegal multibyte sequence
Am I misunderstanding the fuction decode()?
According to the Python 3.5.2 Standard Library decode "Return a string decoded from the given bytes.".
But I got cp949 instead of a utf-8 string.
Can anyone tell me what's wrong with my code?