Closed alim-akbashev closed 9 years ago
I just updated the netty-socketio-demo. You should set utf-8 charset as meta param in your html head section.
didnt help
do you use 1.3.3 client?
yep
(without forcibly enabled jsonp) how did you do that?
(without forcibly enabled jsonp) how did you do that?
i simply did not set forceJSONP: true
in io.connect opts
in that case socket.io.js uses b64=1 for IE9 (at least IE9, not sure about all other old browsers)
i have tried both cases:
var socket = io.connect('http://localhost:9092', {'forceJSONP': true});
and
var socket = io.connect('http://localhost:9092', {'forceJSONP': false});
and didn't encounter any problems with utf-8 encoding.
ok, i'll retry again with latest version from master and will provide test project if issue still exists
IE9 with default opts:
LOG: socket.io-client:manager readyState opening +2ms
LOG: socket.io-client:manager open +232ms
LOG: socket.io-client:socket transport is open - connecting +0ms
LOG: socket.io-parser decoded 0 as %j +0ms[object Object]
LOG: socket.io-client:manager error +17sError: server error
LOG: socket.io-client:manager writing packet %j +6s[object Object]
LOG: socket.io-parser encoding packet %j +23s[object Object]
LOG: socket.io-parser encoded %j as [object Object] +0ms2["chatevent",{"userName":"user56","message":"ыыыыыы"}]
LOG: socket.io-client:manager error +87msError: server error
latest Chrome with opts {forceBase64: true, transports: ['polling']};
:
engine.io-client:polling-xhr xhr data null +1ms
socket.io.js:1 socket.io-client:manager writing packet %j +6s Object {type: 2, data: Array[2], nsp: "/"}
socket.io.js:1 socket.io-parser encoding packet %j +6s Object {type: 2, data: Array[2], nsp: "/"}
socket.io.js:1 socket.io-parser encoded %j as Object +2ms 2["chatevent",{"userName":"user123","message":"бла"}]
socket.io.js:2 engine.io-client:socket flushing 1 packets in socket +7s
socket.io.js:2 engine.io-client:polling-xhr xhr open POST: http://socketio.dev/socket.io/?EIO=3&transport=polling&t=1423333172300-3&b64=1&sid=488054a6-e1c4-4375-8916-4b2a4462d270 +3ms
socket.io.js:2 engine.io-client:polling-xhr xhr data 57:42["chatevent",{"userName":"user123","message":"бла"}] +14ms
socket.io.js:2 engine.io-client:polling polling got data 57:42["chatevent",{"userName":"user123","message":"бла"}] +73ms
socket.io.js:2 engine.io-client:socket socket receive: type "error", data "parser error" +1ms
socket.io.js:1 socket.io-client:manager error +98ms Error: server error {code: "parser error", stack: (...), message: "server error"}
i guess no need to publish test project cuz i'm using master branch of backend without any changes + master branch of netty-socketio-demo with only changes - url
btw, this issue is fixed in my fork. hope it would be helpful for you, @mrniko
Ready! i migrated to your processUtf8
;)
Messages containing utf-8 (cyrillic for example) cause parse error on client in IE9 (without forcibly enabled jsonp)