Skip to content

proper UTF-8 handling#125

Open
AyrA wants to merge 1 commit into
mscdex:masterfrom
AyrA:patch-1
Open

proper UTF-8 handling#125
AyrA wants to merge 1 commit into
mscdex:masterfrom
AyrA:patch-1

Conversation

@AyrA

@AyrA AyrA commented Aug 13, 2015

Copy link
Copy Markdown

This code properly handles UTF-8 server responses and prevents double encoding.

This code properly handles UTF-8 server responses and prevents double encoding.
@AyrA AyrA mentioned this pull request Aug 13, 2015
@mscdex

mscdex commented Aug 14, 2015

Copy link
Copy Markdown
Owner

I still prefer to check and only use utf8 if the server explicitly supports it. A slightly better way to handle the encoding might be to just do source.setEncoding('binary') or source.setEncoding('utf8') depending on the server. That way data events always get properly formed strings.

@sitexw

sitexw commented Sep 3, 2015

Copy link
Copy Markdown

I agree with you (@mscdex) and @AyrA. But for now, nothing happens ...
I think it would be good to implement the code of @AyrA and add a variable "encoding" the options that allows you to manually set the encoding with a default value of "binary", not to break compatibility with an older application.

It would be really nice if it could be done quickly because for myself, I have to manually edit the package ... Thank you.

@hdjarv

hdjarv commented Sep 7, 2015

Copy link
Copy Markdown

Hi, I'm really interested in proper UTF-8 support for this great node module. Any news wether this PR (#123 as well?) is going to be merged into master?

@mscdex

mscdex commented Sep 7, 2015

Copy link
Copy Markdown
Owner

I've decided to go about this slightly differently in ebb0fab, which should be more efficient.

Can you please test the master branch and let me know if that works for you all?

@hdjarv

hdjarv commented Sep 8, 2015

Copy link
Copy Markdown

I've tested current master (ebb0fab) and it works fine for me.

@jpxd jpxd mentioned this pull request Dec 9, 2015
@AntonBryansky

Copy link
Copy Markdown

@AyrA
What's about changing in parser lib? There used "buffer += chunk.toString("binary")" construction. May be it'll help.

@bachvtuan

Copy link
Copy Markdown

Hi everyone. how are thing going now ?
I see this issue isn't fixed for a long time.

@lerit

lerit commented Feb 17, 2017

Copy link
Copy Markdown

it work for me ,resolve my problem,can you merge it to master?
@mscdex

@actiontwo

Copy link
Copy Markdown

Yeah, It work with me to, but no one merge to master

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.

8 participants