if (!Object.hasOwn(char2byte, chr)) {
            const reason = `cannot find character ${chr}`;
            const object = string;
            const position = {start, end: start + 1};
            throw new ASCIIEncodeError(reason, object, position);