Archived
1
0

Fix images not appearing (iconv encoding issue)

Fixed by returning the original buffer from `fs.read` and then just
using whatever encoding was passed in to iconv, so this should all work
exactly the same now as it does on native Node.
This commit is contained in:
Asher
2019-02-27 14:40:57 -06:00
parent 20c0fc4c52
commit 3bacbca325
4 changed files with 51 additions and 36 deletions

View File

@ -10,7 +10,7 @@ class IconvLiteDecoderStream extends Transform {
super(options);
// tslint:disable-next-line no-any
this.conv = (iconv as any).getDecoder(options.encoding, undefined);
options.encoding = this.encoding = "utf8";
this.encoding = options.encoding;
}
// tslint:disable-next-line no-any