angular-ui/ui-grid

Cannot change encoding in csv export

已關閉

#3,771 建立於 2015年6月12日

 (11 則留言) (0 個反應) (0 位負責人)JavaScript (2,496 個分叉)batch import
grid-exporterhelp wanted

倉庫指標

星標
 (5,395 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

It seems that related issue is discussed here.

I cannot change the encoding other then UTF-8, when I toggle exporterOlderExcelCompatibility I can see result in notepad++ as utf-8 and utf-8 without BOM. But I cannot set encoding to windows "windows-1254" or "ascii" or iso-8859-9

What I am trying to achieve UCS-2 little endian which works properly in client pc

when I look at the source at line 16106:

        downloadFile: function (fileName, csvContent, exporterOlderExcelCompatibility) {
          var D = document;
          var a = D.createElement('a');
          var strMimeType = 'application/octet-stream;charset=utf-8';
          var rawFile;
          var ieVersion;
          //....

By the way, as comma is decimal in my local (tr-TR) so excel seems to not willing to accept is delimiter automatically, (Option for delimiter is)[https://github.com/angular-ui/ng-grid/issues/2646#issuecomment-71741657] "exporterCsvColumnSeparator" that I found source code which is missing in tutorial documentation

貢獻者指南