Skip to content

Commit 1041bca

Browse files
committed
Update to release v4.1.1
1 parent 648042a commit 1041bca

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

CHANGE.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version 4.1.1
44

55
1. (bug #76): Update filestack when `showPreview` is false.
66
2. (bug #78): Set uploadExtraData parameters to be correctly sent via POST.
7+
3. (enh #58): Set a new property `textEncoding` for reading the text files with right encoding.
78

89
version 4.1.0
910
=============

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,9 @@ Defaults to the following setting:
816816
}
817817
```
818818

819+
#### textEncoding
820+
_string_ the encoding to be used while reading a text file. Applicable only for previewing text files. Defaults to `UTF-8`.
821+
819822
### Plugin Events
820823
The plugin supports these events:
821824

js/fileinput.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@
12661266
}
12671267
};
12681268
if (isText(file.type, caption)) {
1269-
reader.readAsText(file);
1269+
reader.readAsText(file, self.textEncoding);
12701270
} else {
12711271
reader.readAsArrayBuffer(file);
12721272
}
@@ -1573,7 +1573,8 @@
15731573
dropZoneEnabled: true,
15741574
dropZoneTitle: 'Drag & drop files here …',
15751575
dropZoneTitleClass: 'file-drop-zone-title',
1576-
fileActionSettings: {}
1576+
fileActionSettings: {},
1577+
textEncoding: 'UTF-8'
15771578
};
15781579

15791580
/**

js/fileinput.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)