UTF-8

[Django] csv.writer 한글 입력 response.write(u'\ufeff'.encode('utf8')) 를 추가해 주면 된다. def view(request): response = HttpResponse(content_type='text/csv') response['Content-Disposition'] = 'attachment; filename="somefilename.csv"' response.write(u'\ufeff'.encode('utf8')) writer = csv.writer(response) writer.writerow(['1 row', 'A', 'B', 'C']) writer.writerow(['2 row', 'A', 'B', 'C']) return response [출처..
· 기타
[VSCode] Python 실행 시 terminal에서 한글 깨짐 발생 > .vscode/tasks.json 수정 - tasks.json 파일 여는 법 : ctrl + shift + p 누른 후 "Tasks: Configure Tasks" 선택 - python3이면 command에 python3로 입력하면 된다. { "version": "0.1.0", "command": "python", "isShellCommand": true, "args": ["${file}"], "showOutput": "always", "options": { "env": { "PYTHONIOENCODING": "UTF-8" } } } + 추가 인코딩을 utf8이 아닌 EUC-KR로 변경하면 된다. 위에는 utf8으로 아래는 eu..
[Python] ANCI to UTF8 encoding을 mbcs로 하면 된다! import codecs codecs.open("ANSI_file.txt","r",encoding="mbcs") 참고 : stackoverflow
S0PH1A
'UTF-8' 태그의 글 목록