Skip to content

Commit

Permalink
fix(BinaryHelper): Use latin1 for text decoding
Browse files Browse the repository at this point in the history
Latin1 is single byte encoding, which is what we want for a 1-to-1
conversion of the arraybuffer to a string.
  • Loading branch information
floryst committed Jan 30, 2018
1 parent 4424b3f commit 9b40a72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/IO/Core/BinaryHelper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
function arrayBufferToString(arrayBuffer) {
if ('TextDecoder' in window) {
const decoder = new TextDecoder();
const decoder = new TextDecoder('latin1');
return decoder.decode(arrayBuffer);
}
// fallback on platforms w/o TextDecoder
Expand Down

0 comments on commit 9b40a72

Please sign in to comment.