radu-matei / websocket-manager

Real-Time library for ASP .NET Core
https://radu-matei.com/blog/real-time-aspnet-core/
MIT License
452 stars 183 forks source link

Fixes sending websocket messages with international letters (UTF8) #35

Closed mikaelbr closed 7 years ago

mikaelbr commented 7 years ago

Hi! Thanks for the project.

We we're having some encoding issues. Now messages are sent (through SendMessageAsync) using ASCII. This leads to some letters (like æ, ø, å) not working (which is a big issue for us). Messages should be sent as UTF-8. This PR does that.

This PR also fixes an error selecting array segment buffer length, as that became apparent with converting to UTF-8. Now the serialized string length is used for buffer length, but strictly this should be the array segment length. Non-issue when using ASCII, but now when using UTF-8.

Let me know if there are any questions or if you need me to do any changes.

skorunka commented 7 years ago

This should be merged.

RobSchoenaker commented 7 years ago

@skorunka This is fixed in my pull request, along with a lot of other improvements. The Travis build fails however and I am not sure why. See here: https://github.com/RobSchoenaker/websocket-manager/tree/speedup-refactoring

skorunka commented 7 years ago

@RobSchoenaker There are some warnings(lack of await, not used exception variable) which makes CI fail I guess: https://travis-ci.org/radu-matei/websocket-manager/builds/241198675?utm_source=github_status&utm_medium=notification

Should not be hart to fix.

radu-matei commented 7 years ago

Hi! Thank you very much for the contribution you provided so far!

Sorry for delaying this, I have been focusing on different projects lately, but I would love to get back working on this. In order to do this, I would love to enable you people to contribute directly to the projects. Please let me know if you want to be granted write access to branches of this repo.

Thanks, Radu M

radu-matei commented 7 years ago

Merged #35 Thanks for the contributions!