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

removed unnecessary Buffer.toString() with hardcoded utf8 encoding #768

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nlang
Copy link

@nlang nlang commented May 6, 2019

If a message consists of parts with charsets other than UTF-8 (e.g. ISO-8859), converting the buffer to a string with fixed encoding breaks special characters like umlauts.
As net.Socket.write() excepts a Buffer as the first parameter, converting it to string is unnecessary anyways, so removing the Buffer.toString() easily fixes that problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants