Browse Source

Version 2.1 supports reading files with encodings other than UTF-8

pull/41/head 2.1.0
Matthew Holt 11 years ago
parent
commit
b10692acdb
  1. 6
      jquery.parse.js
  2. 4
      jquery.parse.min.js
  3. 5
      parse.jquery.json

6
jquery.parse.js

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
/*
Papa Parse
v2.0.8
v2.1.0
https://github.com/mholt/jquery.parse
*/
@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@
var results = $.parse(text, f.instanceConfig);
completeFunc(results, f.file, f.inputElem, event);
};
reader.readAsText(f.file);
reader.readAsText(f.file, f.instanceConfig.encoding);
}
}
@ -190,7 +190,7 @@ @@ -190,7 +190,7 @@
{
if (start < file.size)
{
reader.readAsText(file.slice(start, Math.min(start + settings.chunkSize, file.size)));
reader.readAsText(file.slice(start, Math.min(start + settings.chunkSize, file.size)), settings.config.encoding);
start += settings.chunkSize;
}
};

4
jquery.parse.min.js vendored

File diff suppressed because one or more lines are too long

5
parse.jquery.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "parse",
"version": "2.0.8",
"version": "2.1.0",
"title": "Papa Parse",
"description": "Papa is a powerful CSV (delimited text) parser that streams large files and gracefully handles malformed input.",
"keywords": [
@ -17,7 +17,8 @@ @@ -17,7 +17,8 @@
"pipe",
"file",
"filereader",
"stream"
"stream",
"encoding"
],
"author": {
"name": "Matthew Holt",

Loading…
Cancel
Save