diff --git a/parser.ts b/parser.ts index 53f012d..fbc5001 100644 --- a/parser.ts +++ b/parser.ts @@ -256,7 +256,7 @@ export class SAXParser extends ParserBase implements UnderlyingSink await readableStreamFromReader(source).pipeThrough( new TextDecoderStream(this._encoding), ).pipeTo( - new WritableStream({ write: str => this.parse(str) }), + new WritableStream({ write: str => this.parse(str, encoding) }), ); } }