naidu / sipml5

Automatically exported from code.google.com/p/sipml5
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

tsip_message_parser do not parse message with non english content #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

To reproduce: try to send MESSAGE with non-english content, parser do not see 
message body in that case.

Is tsip_parser_message.js whole generated file by ragel or it has some custom 
content?

Original issue reported on code.google.com by i...@fomine.com on 29 May 2012 at 1:45

GoogleCodeExporter commented 9 years ago
In my case, the code below work as expected (UTF-8 content escaped). What's the 
issue?

var oSessionIM = new tsip_session_message(oSipStack,
tsip_session.prototype.SetToStr("2233422677"),
tsip_session.prototype.SetHeader("What", "IM"));

oSessionIM.send(new String("Pêche à la moule"), "text/plain; charset=utf8");
oSipStack.on_event_message = function (evt) {
    console.debug(evt.s_phrase);
    switch (evt.e_message_type) {
        case tsip_event_message_type_e.I_MESSAGE:
            {
                evt.get_session().accept();
                console.debug("Incoming message=%s", evt.get_message().get_content_as_string());
                break;
            }
        case tsip_event_message_type_e.AO_MESSAGE:
            {
                if (evt.i_code >= 200 && evt.i_code <= 299) {
                    console.debug("sent");
                }
                else if (evt.i_code >= 300) {
                    console.debug("not sent (%d)", evt.i_code);
                }
                break;
            }
    }
};

Original comment by boss...@yahoo.fr on 29 May 2012 at 5:11

GoogleCodeExporter commented 9 years ago
I have test it with websocket.opcode == binary data(ArrayBuffer) - Ok. But I 
see the issue with message body if websocket.opcode is text frame.
// r59

Original comment by i...@fomine.com on 29 May 2012 at 9:19

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by boss...@yahoo.fr on 1 Oct 2012 at 1:23