[ํ์ด์ฌ] ํ
์คํธ ํ์ผ ์ธ์ฝ๋ฉ ๋ณํ ํจ์
ยท
๐ํ๋ก๊ทธ๋๋ฐ
ํ์ผ์ ์ธ์ฝ๋ฉ์ utf-8๋ก ๋ณํํ๋ ํจ์์ด๋ค. chardet ํจ์นํค ์ค์น๊ฐ ํ์ํ๋ค import chardet # ํจํค์ง ์ค์น ํ์ # file_path -> Encoding Type def is_encoded(file_path: str): rawdata = open(file_path, mode='rb').read() data = chardet.detect(rawdata) result = data['encoding'] return result # File_path, Encoding_Type -> Change Files encoding type def to_utf8(file_path: str, encoding_in: str): try: with open(file_path, 'r', encoding=enc..