-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
Incorrect result for Buffer#toString #6075
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
Comments
The issue is that both input buffers contain invalid character sequences that get substituted with the replacement character, I'll close, |
@bnoordhuis I don't understand where input buffers contain invalid characters? Can you please point out where the input is wrong. |
For example, in the sequence |
I apologize that I still don't understand the concept. Can you please provide some reference where I can read about Buffer in detail so that I could understand what you meant. I might be looking dumb here. |
The no-argument version of Hope that clears it up. |
Thanks a lot @bnoordhuis 💙 💛 💚 💜 |
Hello Team,
I am using older version(
0.10.40
) on one my project and facing some issue while grouping of data typeBuffer
. Issue also present on latest version.Issue
If you see carefully, then there is difference in the
hex
values of both the variables but theirutf8
string values are exactly which is actually creating problem for us.Actual Use Case
Expected Result
We should have 2 keys as user_uuid for posts are different.
Actual Result
All the posts are grouped under same key, because
#toString()
returns same value for both the buffer object.Fix
Buffer#toString
should have defaulthex
encoding output.Please let me know if I am on wrong path or understood incorrectly or it should be fix on other libraries itself. And if you think that I am on right path and it should be fixed here then I can raise a PR for the same.
The text was updated successfully, but these errors were encountered: