Make utf-8 decoding stricter in JavaScript

This commit is contained in:
Tony Garnock-Jones 2023-11-26 00:00:27 +01:00
parent b12d49739c
commit 2532b42959
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import type { Writer, PreserveWritable } from './writer';
import { decodeBase64, encodeBase64 } from './base64';
const textEncoder = new TextEncoder();
const textDecoder = new TextDecoder();
const textDecoder = new TextDecoder('utf-8', { fatal: true });
export const IsPreservesBytes = Symbol.for('IsPreservesBytes');