You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Version
22.7.0
Platform
Subsystem
No response
What steps will reproduce the bug?
isUtf8
or similar, will return false at timesHow 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.
The text was updated successfully, but these errors were encountered: