version bump 0.18.2: hotfix for unicode woes
- fixes #2521 h/t @lanchengkai - fixes #2522 h/t @duchm12
This commit is contained in:
parent
8e6c0411d9
commit
fbf43d4b73
|
@ -4,6 +4,10 @@ This log is intended to keep track of backwards-incompatible changes, including
|
|||
but not limited to API changes and file location changes. Minor behavioral
|
||||
changes may not be included if they are not expected to break existing code.
|
||||
|
||||
## v0.18.2
|
||||
|
||||
* Hotfix for unicode processing of XLSX exports
|
||||
|
||||
## v0.18.1
|
||||
|
||||
* Removed Node ESM build script and folded into standard ESM build
|
||||
|
|
|
@ -1485,9 +1485,9 @@ XLSX.writeFileXLSX(workbook, filename, opts);
|
|||
```
|
||||
|
||||
The `writeFile` method embeds a number of different export functions. This is
|
||||
great for developer experience but not amenable to dead code elimination using
|
||||
the current toolset. When only XLSX exports are needed, this method avoids
|
||||
referencing the other export codecs.
|
||||
great for developer experience but not amenable to tree shaking using the
|
||||
current developer tools. When only XLSX exports are needed, this method avoids
|
||||
referencing the other export functions.
|
||||
|
||||
The second `opts` argument is optional. ["Writing Options"](#writing-options)
|
||||
covers the supported properties and behaviors.
|
||||
|
|
|
@ -1 +1 @@
|
|||
XLSX.version = '0.18.1';
|
||||
XLSX.version = '0.18.2';
|
||||
|
|
|
@ -56,7 +56,7 @@ function ab2a(data/*:ArrayBuffer|Uint8Array*/)/*:Array<number>*/ {
|
|||
}
|
||||
|
||||
function utf8decode(content/*:string*/) {
|
||||
var out = [], widx = 0;
|
||||
var out = [], widx = 0, L = content.length + 250;
|
||||
var o = new_raw_buf(content.length + 255);
|
||||
for(var ridx = 0; ridx < content.length; ++ridx) {
|
||||
var c = content.charCodeAt(ridx);
|
||||
|
@ -76,10 +76,11 @@ function utf8decode(content/*:string*/) {
|
|||
o[widx++] = (128|((c>>6)&63));
|
||||
o[widx++] = (128|(c&63));
|
||||
}
|
||||
if(widx > 65530) {
|
||||
if(widx > L) {
|
||||
out.push(o.slice(0, widx));
|
||||
widx = 0;
|
||||
o = new_raw_buf(65535);
|
||||
L = 65530;
|
||||
}
|
||||
}
|
||||
out.push(o.slice(0, widx));
|
||||
|
|
|
@ -53,6 +53,7 @@ function buf_array()/*:BufArray*/ {
|
|||
}
|
||||
|
||||
function write_record(ba/*:BufArray*/, type/*:string*/, payload, length/*:?number*/) {
|
||||
if(!XLSBRE) make_XLSBRE();
|
||||
var t/*:number*/ = +XLSBRE[type], l;
|
||||
if(isNaN(t)) return; // TODO: throw something here?
|
||||
if(!length) length = XLSBRecordEnum[t].p || (payload||[]).length || 0;
|
||||
|
|
|
@ -841,10 +841,13 @@ var XLSBRecordEnum = {
|
|||
/*::[*/0xFFFF/*::]*/: { n:"" }
|
||||
};
|
||||
|
||||
var XLSBRE = evert_key(XLSBRecordEnum, 'n');
|
||||
/*jshint -W069 */
|
||||
XLSBRE["BrtFRTArchID$"] = 0x0010;
|
||||
/*jshint +W069 */
|
||||
var XLSBRE;
|
||||
function make_XLSBRE() {
|
||||
XLSBRE = evert_key(XLSBRecordEnum, 'n');
|
||||
/*jshint -W069 */
|
||||
XLSBRE["BrtFRTArchID$"] = 0x0010;
|
||||
/*jshint +W069 */
|
||||
}
|
||||
|
||||
/* [MS-XLS] 2.3 Record Enumeration (and other sources) */
|
||||
var XLSRecordEnum = {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -160,7 +160,7 @@ var DO_NOT_EXPORT_CODEPAGE = true;
|
|||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.18.1';
|
||||
XLSX.version = '0.18.2';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*global cptable:true, window */
|
||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
|
||||
|
@ -345,7 +345,7 @@ var o = new Array(data.length);
|
|||
}
|
||||
|
||||
function utf8decode(content) {
|
||||
var out = [], widx = 0;
|
||||
var out = [], widx = 0, L = content.length + 250;
|
||||
var o = new_raw_buf(content.length + 255);
|
||||
for(var ridx = 0; ridx < content.length; ++ridx) {
|
||||
var c = content.charCodeAt(ridx);
|
||||
|
@ -365,10 +365,11 @@ function utf8decode(content) {
|
|||
o[widx++] = (128|((c>>6)&63));
|
||||
o[widx++] = (128|(c&63));
|
||||
}
|
||||
if(widx > 65530) {
|
||||
if(widx > L) {
|
||||
out.push(o.slice(0, widx));
|
||||
widx = 0;
|
||||
o = new_raw_buf(65535);
|
||||
L = 65530;
|
||||
}
|
||||
}
|
||||
out.push(o.slice(0, widx));
|
||||
|
@ -4148,6 +4149,7 @@ function buf_array() {
|
|||
}
|
||||
|
||||
function write_record(ba, type, payload, length) {
|
||||
if(!XLSBRE) make_XLSBRE();
|
||||
var t = +XLSBRE[type], l;
|
||||
if(isNaN(t)) return; // TODO: throw something here?
|
||||
if(!length) length = XLSBRecordEnum[t].p || (payload||[]).length || 0;
|
||||
|
@ -19927,10 +19929,13 @@ var XLSBRecordEnum = {
|
|||
0xFFFF: { n:"" }
|
||||
};
|
||||
|
||||
var XLSBRE = evert_key(XLSBRecordEnum, 'n');
|
||||
/*jshint -W069 */
|
||||
XLSBRE["BrtFRTArchID$"] = 0x0010;
|
||||
/*jshint +W069 */
|
||||
var XLSBRE;
|
||||
function make_XLSBRE() {
|
||||
XLSBRE = evert_key(XLSBRecordEnum, 'n');
|
||||
/*jshint -W069 */
|
||||
XLSBRE["BrtFRTArchID$"] = 0x0010;
|
||||
/*jshint +W069 */
|
||||
}
|
||||
|
||||
/* [MS-XLS] 2.3 Record Enumeration (and other sources) */
|
||||
var XLSRecordEnum = {
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.18.1';
|
||||
XLSX.version = '0.18.2';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*global cptable:true, window */
|
||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
|
||||
|
@ -189,7 +189,7 @@ var o = new Array(data.length);
|
|||
}
|
||||
|
||||
function utf8decode(content) {
|
||||
var out = [], widx = 0;
|
||||
var out = [], widx = 0, L = content.length + 250;
|
||||
var o = new_raw_buf(content.length + 255);
|
||||
for(var ridx = 0; ridx < content.length; ++ridx) {
|
||||
var c = content.charCodeAt(ridx);
|
||||
|
@ -209,10 +209,11 @@ function utf8decode(content) {
|
|||
o[widx++] = (128|((c>>6)&63));
|
||||
o[widx++] = (128|(c&63));
|
||||
}
|
||||
if(widx > 65530) {
|
||||
if(widx > L) {
|
||||
out.push(o.slice(0, widx));
|
||||
widx = 0;
|
||||
o = new_raw_buf(65535);
|
||||
L = 65530;
|
||||
}
|
||||
}
|
||||
out.push(o.slice(0, widx));
|
||||
|
@ -3992,6 +3993,7 @@ function buf_array() {
|
|||
}
|
||||
|
||||
function write_record(ba, type, payload, length) {
|
||||
if(!XLSBRE) make_XLSBRE();
|
||||
var t = +XLSBRE[type], l;
|
||||
if(isNaN(t)) return; // TODO: throw something here?
|
||||
if(!length) length = XLSBRecordEnum[t].p || (payload||[]).length || 0;
|
||||
|
@ -19771,10 +19773,13 @@ var XLSBRecordEnum = {
|
|||
0xFFFF: { n:"" }
|
||||
};
|
||||
|
||||
var XLSBRE = evert_key(XLSBRecordEnum, 'n');
|
||||
/*jshint -W069 */
|
||||
XLSBRE["BrtFRTArchID$"] = 0x0010;
|
||||
/*jshint +W069 */
|
||||
var XLSBRE;
|
||||
function make_XLSBRE() {
|
||||
XLSBRE = evert_key(XLSBRecordEnum, 'n');
|
||||
/*jshint -W069 */
|
||||
XLSBRE["BrtFRTArchID$"] = 0x0010;
|
||||
/*jshint +W069 */
|
||||
}
|
||||
|
||||
/* [MS-XLS] 2.3 Record Enumeration (and other sources) */
|
||||
var XLSRecordEnum = {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -39,9 +39,9 @@ XLSX.writeFileXLSX(workbook, filename, opts);
|
|||
```
|
||||
|
||||
The `writeFile` method embeds a number of different export functions. This is
|
||||
great for developer experience but not amenable to dead code elimination using
|
||||
the current toolset. When only XLSX exports are needed, this method avoids
|
||||
referencing the other export codecs.
|
||||
great for developer experience but not amenable to tree shaking using the
|
||||
current developer tools. When only XLSX exports are needed, this method avoids
|
||||
referencing the other export functions.
|
||||
|
||||
The second `opts` argument is optional. ["Writing Options"](#writing-options)
|
||||
covers the supported properties and behaviors.
|
||||
|
|
|
@ -1399,9 +1399,9 @@ XLSX.writeFileXLSX(workbook, filename, opts);
|
|||
```
|
||||
|
||||
The `writeFile` method embeds a number of different export functions. This is
|
||||
great for developer experience but not amenable to dead code elimination using
|
||||
the current toolset. When only XLSX exports are needed, this method avoids
|
||||
referencing the other export codecs.
|
||||
great for developer experience but not amenable to tree shaking using the
|
||||
current developer tools. When only XLSX exports are needed, this method avoids
|
||||
referencing the other export functions.
|
||||
|
||||
The second `opts` argument is optional. ["Writing Options"](#writing-options)
|
||||
covers the supported properties and behaviors.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "xlsx",
|
||||
"version": "0.18.1",
|
||||
"version": "0.18.2",
|
||||
"author": "sheetjs",
|
||||
"description": "SheetJS Spreadsheet data parser and writer",
|
||||
"keywords": [
|
||||
|
|
19
xlsx.flow.js
19
xlsx.flow.js
|
@ -4,7 +4,7 @@
|
|||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.18.1';
|
||||
XLSX.version = '0.18.2';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*:: declare var cptable:any; */
|
||||
/*global cptable:true, window */
|
||||
|
@ -191,7 +191,7 @@ function ab2a(data/*:ArrayBuffer|Uint8Array*/)/*:Array<number>*/ {
|
|||
}
|
||||
|
||||
function utf8decode(content/*:string*/) {
|
||||
var out = [], widx = 0;
|
||||
var out = [], widx = 0, L = content.length + 250;
|
||||
var o = new_raw_buf(content.length + 255);
|
||||
for(var ridx = 0; ridx < content.length; ++ridx) {
|
||||
var c = content.charCodeAt(ridx);
|
||||
|
@ -211,10 +211,11 @@ function utf8decode(content/*:string*/) {
|
|||
o[widx++] = (128|((c>>6)&63));
|
||||
o[widx++] = (128|(c&63));
|
||||
}
|
||||
if(widx > 65530) {
|
||||
if(widx > L) {
|
||||
out.push(o.slice(0, widx));
|
||||
widx = 0;
|
||||
o = new_raw_buf(65535);
|
||||
L = 65530;
|
||||
}
|
||||
}
|
||||
out.push(o.slice(0, widx));
|
||||
|
@ -4079,6 +4080,7 @@ function buf_array()/*:BufArray*/ {
|
|||
}
|
||||
|
||||
function write_record(ba/*:BufArray*/, type/*:string*/, payload, length/*:?number*/) {
|
||||
if(!XLSBRE) make_XLSBRE();
|
||||
var t/*:number*/ = +XLSBRE[type], l;
|
||||
if(isNaN(t)) return; // TODO: throw something here?
|
||||
if(!length) length = XLSBRecordEnum[t].p || (payload||[]).length || 0;
|
||||
|
@ -19888,10 +19890,13 @@ var XLSBRecordEnum = {
|
|||
/*::[*/0xFFFF/*::]*/: { n:"" }
|
||||
};
|
||||
|
||||
var XLSBRE = evert_key(XLSBRecordEnum, 'n');
|
||||
/*jshint -W069 */
|
||||
XLSBRE["BrtFRTArchID$"] = 0x0010;
|
||||
/*jshint +W069 */
|
||||
var XLSBRE;
|
||||
function make_XLSBRE() {
|
||||
XLSBRE = evert_key(XLSBRecordEnum, 'n');
|
||||
/*jshint -W069 */
|
||||
XLSBRE["BrtFRTArchID$"] = 0x0010;
|
||||
/*jshint +W069 */
|
||||
}
|
||||
|
||||
/* [MS-XLS] 2.3 Record Enumeration (and other sources) */
|
||||
var XLSRecordEnum = {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.18.1';
|
||||
XLSX.version = '0.18.2';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*global cptable:true, window */
|
||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
|
||||
|
@ -189,7 +189,7 @@ var o = new Array(data.length);
|
|||
}
|
||||
|
||||
function utf8decode(content) {
|
||||
var out = [], widx = 0;
|
||||
var out = [], widx = 0, L = content.length + 250;
|
||||
var o = new_raw_buf(content.length + 255);
|
||||
for(var ridx = 0; ridx < content.length; ++ridx) {
|
||||
var c = content.charCodeAt(ridx);
|
||||
|
@ -209,10 +209,11 @@ function utf8decode(content) {
|
|||
o[widx++] = (128|((c>>6)&63));
|
||||
o[widx++] = (128|(c&63));
|
||||
}
|
||||
if(widx > 65530) {
|
||||
if(widx > L) {
|
||||
out.push(o.slice(0, widx));
|
||||
widx = 0;
|
||||
o = new_raw_buf(65535);
|
||||
L = 65530;
|
||||
}
|
||||
}
|
||||
out.push(o.slice(0, widx));
|
||||
|
@ -3992,6 +3993,7 @@ function buf_array() {
|
|||
}
|
||||
|
||||
function write_record(ba, type, payload, length) {
|
||||
if(!XLSBRE) make_XLSBRE();
|
||||
var t = +XLSBRE[type], l;
|
||||
if(isNaN(t)) return; // TODO: throw something here?
|
||||
if(!length) length = XLSBRecordEnum[t].p || (payload||[]).length || 0;
|
||||
|
@ -19771,10 +19773,13 @@ var XLSBRecordEnum = {
|
|||
0xFFFF: { n:"" }
|
||||
};
|
||||
|
||||
var XLSBRE = evert_key(XLSBRecordEnum, 'n');
|
||||
/*jshint -W069 */
|
||||
XLSBRE["BrtFRTArchID$"] = 0x0010;
|
||||
/*jshint +W069 */
|
||||
var XLSBRE;
|
||||
function make_XLSBRE() {
|
||||
XLSBRE = evert_key(XLSBRecordEnum, 'n');
|
||||
/*jshint -W069 */
|
||||
XLSBRE["BrtFRTArchID$"] = 0x0010;
|
||||
/*jshint +W069 */
|
||||
}
|
||||
|
||||
/* [MS-XLS] 2.3 Record Enumeration (and other sources) */
|
||||
var XLSRecordEnum = {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.18.1';
|
||||
XLSX.version = '0.18.2';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*:: declare var cptable:any; */
|
||||
/*global cptable:true, window */
|
||||
|
@ -191,7 +191,7 @@ function ab2a(data/*:ArrayBuffer|Uint8Array*/)/*:Array<number>*/ {
|
|||
}
|
||||
|
||||
function utf8decode(content/*:string*/) {
|
||||
var out = [], widx = 0;
|
||||
var out = [], widx = 0, L = content.length + 250;
|
||||
var o = new_raw_buf(content.length + 255);
|
||||
for(var ridx = 0; ridx < content.length; ++ridx) {
|
||||
var c = content.charCodeAt(ridx);
|
||||
|
@ -211,10 +211,11 @@ function utf8decode(content/*:string*/) {
|
|||
o[widx++] = (128|((c>>6)&63));
|
||||
o[widx++] = (128|(c&63));
|
||||
}
|
||||
if(widx > 65530) {
|
||||
if(widx > L) {
|
||||
out.push(o.slice(0, widx));
|
||||
widx = 0;
|
||||
o = new_raw_buf(65535);
|
||||
L = 65530;
|
||||
}
|
||||
}
|
||||
out.push(o.slice(0, widx));
|
||||
|
@ -4079,6 +4080,7 @@ function buf_array()/*:BufArray*/ {
|
|||
}
|
||||
|
||||
function write_record(ba/*:BufArray*/, type/*:string*/, payload, length/*:?number*/) {
|
||||
if(!XLSBRE) make_XLSBRE();
|
||||
var t/*:number*/ = +XLSBRE[type], l;
|
||||
if(isNaN(t)) return; // TODO: throw something here?
|
||||
if(!length) length = XLSBRecordEnum[t].p || (payload||[]).length || 0;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.18.1';
|
||||
XLSX.version = '0.18.2';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*global cptable:true, window */
|
||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
|
||||
|
@ -189,7 +189,7 @@ var o = new Array(data.length);
|
|||
}
|
||||
|
||||
function utf8decode(content) {
|
||||
var out = [], widx = 0;
|
||||
var out = [], widx = 0, L = content.length + 250;
|
||||
var o = new_raw_buf(content.length + 255);
|
||||
for(var ridx = 0; ridx < content.length; ++ridx) {
|
||||
var c = content.charCodeAt(ridx);
|
||||
|
@ -209,10 +209,11 @@ function utf8decode(content) {
|
|||
o[widx++] = (128|((c>>6)&63));
|
||||
o[widx++] = (128|(c&63));
|
||||
}
|
||||
if(widx > 65530) {
|
||||
if(widx > L) {
|
||||
out.push(o.slice(0, widx));
|
||||
widx = 0;
|
||||
o = new_raw_buf(65535);
|
||||
L = 65530;
|
||||
}
|
||||
}
|
||||
out.push(o.slice(0, widx));
|
||||
|
@ -3992,6 +3993,7 @@ function buf_array() {
|
|||
}
|
||||
|
||||
function write_record(ba, type, payload, length) {
|
||||
if(!XLSBRE) make_XLSBRE();
|
||||
var t = +XLSBRE[type], l;
|
||||
if(isNaN(t)) return; // TODO: throw something here?
|
||||
if(!length) length = XLSBRecordEnum[t].p || (payload||[]).length || 0;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/*exported XLSX */
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
XLSX.version = '0.18.1';
|
||||
XLSX.version = '0.18.2';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
|
||||
var VALID_ANSI = [ 874, 932, 936, 949, 950, 10000 ];
|
||||
|
@ -187,7 +187,7 @@ function ab2a(data/*:ArrayBuffer|Uint8Array*/)/*:Array<number>*/ {
|
|||
}
|
||||
|
||||
function utf8decode(content/*:string*/) {
|
||||
var out = [], widx = 0;
|
||||
var out = [], widx = 0, L = content.length + 250;
|
||||
var o = new_raw_buf(content.length + 255);
|
||||
for(var ridx = 0; ridx < content.length; ++ridx) {
|
||||
var c = content.charCodeAt(ridx);
|
||||
|
@ -207,10 +207,11 @@ function utf8decode(content/*:string*/) {
|
|||
o[widx++] = (128|((c>>6)&63));
|
||||
o[widx++] = (128|(c&63));
|
||||
}
|
||||
if(widx > 65530) {
|
||||
if(widx > L) {
|
||||
out.push(o.slice(0, widx));
|
||||
widx = 0;
|
||||
o = new_raw_buf(65535);
|
||||
L = 65530;
|
||||
}
|
||||
}
|
||||
out.push(o.slice(0, widx));
|
||||
|
@ -4076,6 +4077,7 @@ function buf_array()/*:BufArray*/ {
|
|||
}
|
||||
|
||||
function write_record(ba/*:BufArray*/, type/*:string*/, payload, length/*:?number*/) {
|
||||
if(!XLSBRE) make_XLSBRE();
|
||||
var t/*:number*/ = +XLSBRE[type], l;
|
||||
if(isNaN(t)) return; // TODO: throw something here?
|
||||
if(!length) length = XLSBRecordEnum[t].p || (payload||[]).length || 0;
|
||||
|
@ -19847,10 +19849,13 @@ var XLSBRecordEnum = {
|
|||
/*::[*/0xFFFF/*::]*/: { n:"" }
|
||||
};
|
||||
|
||||
var XLSBRE = evert_key(XLSBRecordEnum, 'n');
|
||||
/*jshint -W069 */
|
||||
XLSBRE["BrtFRTArchID$"] = 0x0010;
|
||||
/*jshint +W069 */
|
||||
var XLSBRE;
|
||||
function make_XLSBRE() {
|
||||
XLSBRE = evert_key(XLSBRecordEnum, 'n');
|
||||
/*jshint -W069 */
|
||||
XLSBRE["BrtFRTArchID$"] = 0x0010;
|
||||
/*jshint +W069 */
|
||||
}
|
||||
|
||||
/* [MS-XLS] 2.3 Record Enumeration (and other sources) */
|
||||
var XLSRecordEnum = {
|
||||
|
|
Loading…
Reference in New Issue