Skip to content

Commit 3e771b7

Browse files
committed
Merge pull request NLPchina#221 from stegano/patch-1
String crush issue on MS Excel
2 parents df8716f + 863357e commit 3e771b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_site/controllers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ function updateWithScrollIfNeeded (query) {
255255
data += "\n";
256256
data += map2csvStr(columns,rows[i],delimiter) ;
257257
}
258-
var plain = 'data:text/csv;charset=utf8,' + encodeURIComponent(data);
258+
var plain = 'data:text/csv;charset=utf8,\uFEFF' + encodeURIComponent(data);
259259
download(plain, "query_result.csv", "text/plain");
260260
return true;
261261
}
@@ -400,4 +400,4 @@ function updateWithScrollIfNeeded (query) {
400400
function saveUrl() {
401401
localStorage.setItem("lasturl", $scope.url);
402402
}
403-
});
403+
});

0 commit comments

Comments
 (0)