mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
@@ -250,3 +250,13 @@ it("invalid utf-8 input, pr #3562", () => {
|
||||
output += decoder.end();
|
||||
expect(output).toStrictEqual("\uFFFD\uFFFD");
|
||||
});
|
||||
|
||||
it("decoding latin1, issue #3738", () => {
|
||||
const decoder = new RealStringDecoder("latin1");
|
||||
let output = "";
|
||||
output += decoder.write(Buffer.from("DD", "hex"));
|
||||
output += decoder.write(Buffer.from("59", "hex"));
|
||||
output += decoder.write(Buffer.from("DE", "hex"));
|
||||
output += decoder.end();
|
||||
expect(output).toStrictEqual("ÝYÞ");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user