Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky text encoding regression in Node 22 #54718

Closed
jarle opened this issue Sep 2, 2024 · 1 comment
Closed

Flaky text encoding regression in Node 22 #54718

jarle opened this issue Sep 2, 2024 · 1 comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@jarle
Copy link

jarle commented Sep 2, 2024

Version

22.7.0

Platform

Debian 12

Subsystem

No response

What steps will reproduce the bug?

  • Fetch UTF8 content with special characters from external API (triggers most often for Spanish/Portugese text)
  • Try validating the content with isUtf8 or similar, will return false at times

How often does it reproduce? Is there a required condition?

The required condition is that the fetched text should have special characters. It seems to happen sporadically, and is not possible to recreate deterministically.

What is the expected behavior? Why is that the expected behavior?

UTF-8 content should stay encoded as UTF-8.

What do you see instead?

Example when inserting into a Postgres database expecting UTF-8: invalid byte sequence for encoding "UTF8": 0xe8 0x20 0x66

Additional information

I have had this happen in two unrelated systems, both running latest node:22-slim docker images. It also happens locally.

From the byte sequences, it seems there is some mix with latin1 and utf-8, but I'm not sure.

@avivkeller avivkeller closed this as not planned Won't fix, can't repro, duplicate, stale Sep 2, 2024
@avivkeller avivkeller added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Sep 2, 2024
@avivkeller
Copy link
Member

avivkeller commented Sep 2, 2024

This issue will be resolved when v22.8.0 releases (hopefully today)

Duplicate of #54521

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

2 participants