#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http

제목file 질문2022-04-22 10:45
작성자

with open('파일명', 'r') as file:

    print(file)


이렇게 하면 <_io.TextIOWrapper name='파일명' mode='r' encoding='cp949'>

이렇게 출력됩니다. cp949로 인코딩 되어있다는 뜻으로 해석하였는데 이때 실습에서 인터넷 화일을 읽을 때 utf-8로 디코딩 하는 방법은 없나요? 

파일명.read() 하는 것이 디코딩 하는 과정인건가요?


감사합니다.

댓글
이전[re][re][re]METHOD 관련 질문입니다2022-04-22
다음[re]file 질문2022-04-22