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
'Programming > Web' 카테고리의 다른 글
Angular.js controller 간 데이터 공유 (0) | 2016.04.06 |
---|---|
angularjs 에서 multipart/form-data $http로 upload하기 (0) | 2016.03.22 |
모달창 드래그앤드롭 하기 (0) | 2015.05.08 |
JavaScript No 'Access-Control-Allow-Origin' 에러 해결하기 (0) | 2015.04.16 |
자바스크립트 함수 존재 여부 확인 (0) | 2014.12.05 |
댓글