question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistent with nodejs

See original GitHub issue

Hello, i’m using the following buffer

let b = Buffer.from([
191, 164, 235, 131, 30, 28, 164, 179, 101,
138, 94, 36, 115, 176, 83, 193, 9, 177, 85,
228, 189, 193, 127, 71, 165, 16, 211, 132,
228, 241, 57, 207, 254, 152, 122, 98, 100, 
71, 67, 100, 29, 218, 165, 101, 25, 17, 177,
173, 92, 173, 162, 186, 198, 1, 80, 94, 228, 
165, 124, 171, 78, 49, 145, 158
])

and toString(‘utf8’) results are different in NodeJS and in browsers.

It seems that some characters that some sequence which nodejs replace to U+FFFD are more lengthy than the replaced sequence in browser. so output utf8 string is different

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jessetanecommented, Sep 24, 2017

the tests are already in node. to get them just do ./bin/download-node-tests.js

1reaction
jessetanecommented, Sep 24, 2017

this and #164 should likely be merged

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inconsistent http stream behavior #33672 - nodejs/node - GitHub
We have web-server and we want to limit the amount of data that can be sent by the client. In the code below,...
Read more >
Inconsistent method result in node js - Stack Overflow
The problem I am having is that when I create an instance of the object, it seems like the request portion of the...
Read more >
Feature Idea: [Node] JS `Memory/` metrics use inconsistent ...
The NodeJS agent reports memory metrics by default: Memory/Heap/Free , Memory/Heap/Max , Memory/Heap/Used as well as Memory/NonHeap/Used and ...
Read more >
Errors | Node.js v19.3.0 Documentation
A Node.js API that consumes file: URLs (such as certain functions in the fs module) encountered a file URL with an incompatible path....
Read more >
Inconsistent Behaviour In Mongoose and MongoDB
Hi friends, I have an Any data type in my Mongo DB schema in a NodeJS application where I add new properties or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found