WebsocketStompKit
WebsocketStompKit copied to clipboard
Can't send accented characters.
I've been using your WebSocketStompKit library. Pretty great! Thanks for making it.
I noticed an issue when trying to send special characters like é. The count is calculated incorrectly, resulting in a failure to send the message.
I think there's a fix on line 372 of WebSocketStompKit.m. You just need to calculate the length using UTF-8.
So the calculation should be: [body lengthOfBytesUsingEncoding:NSUTF8StringEncoding]
in this file:
https://github.com/rguldener/WebsocketStompKit/blob/master/WebsocketStompKit/WebsocketStompKit.m#L372
Thanks again for this library.
Thanks for the report! Can you test the fix you proposed with your app and open a pull request please?
Thanks!
On 21 Oct 2015, at 20:13, Aaron Scherbing [email protected] wrote:
I've been using your WebSocketStompKit library. Pretty great! Thanks for making it.
I noticed an issue when trying to send special characters like é. The count is calculated incorrectly, resulting in a failure to send the message.
I think there's a fix on line 372 of WebSocketStompKit.m. You just need to calculate the length using UTF-8.
So the calculation should be: [body lengthOfBytesUsingEncoding:NSUTF8StringEncoding]
in this file:
https://github.com/rguldener/WebsocketStompKit/blob/master/WebsocketStompKit/WebsocketStompKit.m#L372
Thanks again for this library.
— Reply to this email directly or view it on GitHub.
Sure thing. When I get some free time, I'll submit that.
On Wednesday, October 21, 2015, Robin Guldener [email protected] wrote:
Thanks for the report! Can you test the fix you proposed with your app and open a pull request please?
Thanks!
On 21 Oct 2015, at 20:13, Aaron Scherbing <[email protected] javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:
I've been using your WebSocketStompKit library. Pretty great! Thanks for making it.
I noticed an issue when trying to send special characters like é. The count is calculated incorrectly, resulting in a failure to send the message.
I think there's a fix on line 372 of WebSocketStompKit.m. You just need to calculate the length using UTF-8.
So the calculation should be: [body lengthOfBytesUsingEncoding:NSUTF8StringEncoding]
in this file:
https://github.com/rguldener/WebsocketStompKit/blob/master/WebsocketStompKit/WebsocketStompKit.m#L372
Thanks again for this library.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub https://github.com/rguldener/WebsocketStompKit/issues/3#issuecomment-150042104 .
Aaron Scherbing - 952.240.1321
I had the same problem when trying to send latin characters like Š Č - this fix worked great!