Html
<button class="btn btn-raised btn-inverse btn-sm" charset="shift_jis" add-bom="true" ng-csv="getSampleData" csv-header="['コード','勘定科目名','Main_code']" filename="{{ samplefilename }}.csv" field-separator="{{separator}}" decimal-separator="{{decimalSeparator}}" ><span translate> load.common.sample </span> </button>
Controller
$scope.csv = {
content: null,
header: true,
headerVisible: true,
separator: ',',
separatorVisible: true,
result: null,
encodingVisible: true,
uploadButtonLabel: "upload a csv file"
};
$scope.samplefilename = "Sample Support Code List"
$scope.getSampleData = [{コード: 'code _1',勘定科目名: '勘定科目名',Main_code:'maincode1'},{コード: 'code_2',勘定科目名: 'name_2', Main_code: 'Miancode2'}];
While downloading csv file in Ubuntu or in Mac, Japanese characters looks good, while downloading it in windows system data(Japanese data) gets junk
here is the screenshot of junk data
![enter image description here](https://i.stack.imgur.com/IEDFn.png)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…