Python

한글 인코딩 깨지는 경우

Kyle79 2023. 3. 2. 10:10
# python common 
# -*- coding: utf-8 -*-

#python 2.x
import sys
reload(sys)
sys.setdefaultencoding('utf-8')

#python <=3.3
import imp
imp.reload(module)
sys.setdefaultencoding('utf-8')

# For >= Python3.4:
import importlib
importlib.reload(module)
sys.setdefaultencoding('utf-8')

'Python' 카테고리의 다른 글

BrowserMob Proxy  (0) 2022.12.11
Selenium Wire  (0) 2022.12.11
User-agent generator  (0) 2022.12.11
Selenium Wire Option  (2) 2022.12.11
Selenium Chrome Option  (0) 2022.12.11