Skip to content

fix(headers): correct windows-1252 test assertion for Node 24.13.1#11085

Closed
mhalikosen wants to merge 1 commit intoremix-run:mainfrom
mhalikosen:fix/windows-1252-test-assertion
Closed

fix(headers): correct windows-1252 test assertion for Node 24.13.1#11085
mhalikosen wants to merge 1 commit intoremix-run:mainfrom
mhalikosen:fix/windows-1252-test-assertion

Conversation

@mhalikosen
Copy link
Copy Markdown

Summary

The "correctly decodes windows-1252 encoded filename" test in content-disposition.test.ts
has been failing on the Windows CI runner since it picked up Node 24.13.1.

The test expects 'file\x80.txt' but receives 'file€.txt'. This is because Node 24.13.1
introduced proper WHATWG Encoding Standard compliance for windows-1252 via
nodejs/node#60893 and nodejs/node#61093. Under the standard, byte 0x80 maps to
U+20AC (Euro sign, ), not the C1 control character U+0080.

The assertion originally expected but was changed to \x80 in fa226ba as a
workaround for the old TextDecoder behavior. This PR reverts the assertion to the
spec-correct value.

The Ubuntu runner still passes because it is on 24.13.0, but it will also fail once
the runner image updates.

Failing CI run: https://github.com/remix-run/remix/actions/runs/22331705571

Test plan

  • pnpm --filter @remix-run/headers run test passes locally
  • CI passes on both ubuntu-latest and windows-latest

Node 24.13.1 introduced proper WHATWG Encoding Standard compliance
for windows-1252 (nodejs/node#60893, nodejs/node#61093), correctly
mapping byte 0x80 to U+20AC (€). The test assertion was previously
changed to expect \x80 as a workaround for the old TextDecoder
behavior in fa226ba.
@mhalikosen
Copy link
Copy Markdown
Author

CI is running Node v24.13.0 which still has the TextDecoder bug. Tests will pass once the repo's Node version is bumped to v24.13.1+.

mjackson added a commit that referenced this pull request Feb 26, 2026
Update engine/docs to Node 25 and align windows-1252 test behavior on Node 25.

Closes #11085
@mjackson
Copy link
Copy Markdown
Member

Fixed in #11087

@mjackson mjackson closed this Feb 26, 2026
@mhalikosen mhalikosen deleted the fix/windows-1252-test-assertion branch February 27, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants