Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
Closed
Description
Version
24.6.0,
Platform
Windows and Ubuntu x86-64 Subsystem
No response
What steps will reproduce the bug?
Here is the testing code:
functiondecodeWindows1252(buffer){constdecoder=newTextDecoder('windows-1252');returndecoder.decode(buffer);}console.log("icu version: "+process.versions.icu);letb=newUint8Array(1)b[0]=150;// 150 in windows-1252 is unicode 2013letu=decodeWindows1252(b);console.log("Decoded Windows-1252:",u);console.log("Encoded Windows-1252:",u.charCodeAt(0).toString(16));Here is the correct output in nodejs v22.12.0
icu version: 76.1 Decoded Windows-1252: – Encoded Windows-1252: 2013 Here is the wrong output for nodejs v24.6.0:
icu version: 77.1 Decoded Windows-1252: Encoded Windows-1252: 96 I tested all the v20, v22 and v23 and v24 versions, some of them are correct, while ther others are wrong.
v20.0.0 - v20.18.2 : correctv20.18.3 - v20.19.4 : wrong
v22.0.0 - v22.12.0 : correctv22.13.0 - v22.18.0 : wrong
v23.0.0 - v23.13.0 : correctv23.4.0 - v23.11.1 : wrong
v24.0.0 - v24.6.0 : wrong
How often does it reproduce? Is there a required condition?
100% reproduce.
What is the expected behavior? Why is that the expected behavior?
the correct above.
What do you see instead?
NA
Additional information
No response
domenic
Metadata
Metadata
Assignees
Labels
No labels