Closed Icydillic closed 9 years ago
Hi, it seems like it is broken (see it here: https://asafdav.github.io/ng-csv/example/)
I'll take a look
I found the reason: Have look into the service line 206 you are missing the decodeURIComponent() function to decode '%ef%bb%bf' or you could use '\ufeff' instead.
Kind regards, Stefan
PS: As a workaround in the meanwhile you could simply add \uFEFF to the first header column.
Can you pull request? I'll take a look
On Mon, Dec 15, 2014 at 4:46 PM, Stefan notifications@github.com wrote:
I found the reason: Have look into the service line 206 you are missing the decodeURIComponent() function to decode '%ef%bb%bf' or you could use '\ufeff' instead.
Kind regards, Stefan
PS: As a workaround in the meanwhile you could simply add \uFEFF to the first header column.
— Reply to this email directly or view it on GitHub https://github.com/asafdav/ng-csv/issues/73#issuecomment-67003592.
I'm affraid I don't know how. The error is in the build section in the ng-csv.js and I don't know how it is created. :o( History: https://github.com/asafdav/ng-csv/commit/05ecc183d915d3ac65f0fa8253523bca0f79fa39 These changes:
if(window.navigator.msSaveOrOpenBlob) { - var blob = new Blob([decodeURIComponent(scope.csv)],{ - type: "text/csv;charset=utf-8;" - }); + var blob = new Blob([scope.csv], { + type: "text/csv;charset=utf-8;" + });
I created a pull request in the build/ng-csv.js.
Fixed by #75
Hi, I tried using the add-bom option when creating a new .csv file. The element properties look like this:
When exporting the file with the "add-bom"-Option it only writes me the stringified hex-value "%ef%bb%bf" into the file. Normaly this shouldn't be the string value I guess. I saw that there are bom-issues and they were resolved, so I don't know what I am doing wrong here. Am I missing something?
Kind regards, Stefan
PS: I see you changed from data uri to blob. Perhaps this is the issue?