Open Bassintag opened 5 months ago
1.1.6+e58d67b46
Linux 6.5.0-28-generic x86_64 x86_64
Create a bun script and try to instantiate a new TextDecoder
// This will fail with either gbk or GBK const decoder = new TextDecoder('gbk');
It should accept the gbk encoding as specified on the MDN web docs: https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder
TypeError: Unsupported encoding label "GBK" code: "ERR_INVALID_ARG_TYPE"
More about the GBK format: https://en.wikipedia.org/wiki/GBK_(character_encoding) It is still used over utf-8 by some chinese websites, not supporting it leads to wrongly decoded characters when using fetch for example
same problem here. I'm using https://www.npmjs.com/package/text-decoding to decode GBK, it works fine
What version of Bun is running?
1.1.6+e58d67b46
What platform is your computer?
Linux 6.5.0-28-generic x86_64 x86_64
What steps can reproduce the bug?
Create a bun script and try to instantiate a new TextDecoder
What is the expected behavior?
It should accept the gbk encoding as specified on the MDN web docs: https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder
What do you see instead?
Additional information
More about the GBK format: https://en.wikipedia.org/wiki/GBK_(character_encoding) It is still used over utf-8 by some chinese websites, not supporting it leads to wrongly decoded characters when using fetch for example