[sip-comm-dev] SIP MESSAGE encoding


#1

Hi again,

We noticed a problem with the character encoding when sending SIP instant messages with characters other than default ASCII (auch as the german or french äöü, áàâ). It seems that the encoding for outgoing messages is not applied properly. So even though this is the default in SIP if not otherwise specified, the messages actually aren't utf-8 encoded.

Attached you find a patch suggestion for two classes to fix this problem. The main changes are located in MessageSipImpl, which now stores the raw byte data (according to the encoding) additionally to the string message. In case that the desired encoding isn't supported, the systems default encoding is used instead (I wasn't sure about whether or not it would be better to throw an exception instead in this case).

WDYT?

Cheers,
Ralph

MessageSipImpl.patch (1.6 KB)

OperationSetBasicInstantMessagingSipImpl.patch (517 Bytes)

···

###########################################
CONFIDENTIALITY: This e-mail and any attachments are confidential and may also be privileged.
If you are not the designated recipient, please notify the sender immediately by reply e-mail and destroy all copies (digital and paper).
Any unauthorized disclosure, distribution, copying, storage or use of the information contained in this e-mail or any attachments is strictly prohibited and may be unlawful.


#2

Hi Ralph,

I've commited your patch, thanks a lot for this !
I've just added a logger warning when the encoding is not supported to keep a trace of it in the logs.

Thanks again,
Ben.

ralph.weires@hitec.lu a �crit :

···

Hi again,

We noticed a problem with the character encoding when sending SIP instant messages with characters other than default ASCII (auch as the german or french ���, ���). It seems that the encoding for outgoing messages is not applied properly. So even though this is the default in SIP if not otherwise specified, the messages actually aren't utf-8 encoded.

Attached you find a patch suggestion for two classes to fix this problem. The main changes are located in MessageSipImpl, which now stores the raw byte data (according to the encoding) additionally to the string message. In case that the desired encoding isn't supported, the systems default encoding is used instead (I wasn't sure about whether or not it would be better to throw an exception instead in this case).

WDYT?

Cheers,
Ralph

###########################################
CONFIDENTIALITY: This e-mail and any attachments are confidential and may also be privileged.
If you are not the designated recipient, please notify the sender immediately by reply e-mail and destroy all copies (digital and paper).
Any unauthorized disclosure, distribution, copying, storage or use of the information contained in this e-mail or any attachments is strictly prohibited and may be unlawful.
------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net