본문 바로가기
Programming/Web

자바스크립트에서 utf-8로 csv 추출할 때 한글 깨짐 문제

by Chan_찬 2016. 1. 22.
728x90
반응형
자바스크립트에서 utf-8로 csv 추출할 때 한글 깨짐 문제
BOM있는 utf-8 로 추출.. 데이터 앞부분에   %EF%BB%BF 추가

data:text/csv;charset=utf-8,%EF%BB%BF


<a href="data:text/csv;charset=utf-8,%EF%BB%BF%22seq%22%2C%22status%22%2C%22storeOwnerSeq%22%2C%22storeOwnerName%22%2C%22payType%22%2C%22withdrawDay%22%2C%22withdrawPrice%22%0A%221%22%2C%221%22%2C%225%22%2C%22%ED%97%AC%EB%A1%9C%EC%9B%94%EB%93%9C%22%2C%221%22%2C%2205%22%2C%2210000%22%0A%222%22%2C%221%22%2C%225%22%2C%22%ED%97%AC%EB%A1%9C%EC%9B%94%EB%93%9C%22%2C%221%22%2C%2210%22%2C%2220000%22%0A%223%22%2C%221%22%2C%225%22%2C%22%ED%97%AC%EB%A1%9C%EC%9B%94%EB%93%9C%22%2C%221%22%2C%2215%22%2C%2230000%22%0A" download="Export-from-Grid.csv">Export Data in CSV file</a>


728x90
728x90
BIG
Buy me a coffeeBuy me a coffee

댓글