powered by Jive Software

I18n & Smack

I’'m using Exodus as a client to Jive Messenger and Smack as another client. I just tried to send from the Exodus client to the Smack Client a message with some spanish characters (alt-130, alt-161, alt-162, etc.) and the message I received at Smack contained non-expected characters.

I don’‘t know if it’'s only a print string issue or if there exists a problem with i18n. Do I need to set any parameter at start up? If I have some free time I will try to answer my questions but in the mean time I will appreciate any answer.

Regards,

– Gato

Hi,

A lot will depend on how the data is being transmitted. As long as the text is valid XML, text will pass through the XMPP network without change. The only automatic text conversion is the 5 XML predefined entities ‘’"<>& that are automatically converted to ’ " etc when sent through Smack, and converted back to their normal UTF-8 characters when received by Smack.

If the spanish characters are being converted into hex equivalents, your software will need to detect and convert them back into UTF-8 characters. Turning on Smack debugging will show you what’‘s being exchanged and hopefully lead to a solution. If you post your results here, another Smack user may have a suggestion (I don’'t have much experience with the problem but will try to help).

-iain

Iain,

Thanks for the help. I’‘ve been doing some more tests without any success. These are the tests that I’'ve done:

  1. Server: Jive Messenger, Client_1: Exodus, Client_2: Jajc

In this case I sent the chars (alt-130, alt-161, alt-160, etc.) from client_1 to client_2 and received also trash characters. Therefore, my thought was that may be the problem was with the server

  1. I tried to install other servers to see if they generate the same output. I tried to install Merlin but couldn’'t start it up. So I tried with Rhombus server and the result was even worst. Whenever I tried to send those chars the server complained about badformed XML!!!

  2. I though that may be the problem was with the clients, so I tried to use the same software client (jajc) as client_1 and client_2. And the result was the same

  3. My last test was to send a message from the Jive Messenger’'s admin console to any of my clients. And it worked fine!!!

After doing all these tests I can say that I’‘m completely lost :-). I couldn’'t use other Jabber Server to discard if the problem was Jive Messenger. But as a side effect of this mini-research I can say that Jive Messenger is good software compared to the other servers. May be it has less features but everything it does works fine.

Regards,

– Gato

Gato,

Glad Messenger is working better than the rest. If I understand what you’‘re doing, I think you’‘re running into clients and servers that don’‘t properly encode and decode UTF-8/Unicode. So when you insert characters outside of the us-ascii character range, they behave unpredictably. Support in most clients and servers is still lagging, especially in products built in languages that don’'t assume support for UTF-8/Unicode.

Messenger and Smack both use Java which is built from the ground up to support i18n. Unfortunately it won’'t help you if you need to interoperate with these other servers and clients, but if you file bugs with the offending software, you may get bug fixes. Jabber has always relied on XML which is supposed to support UTF-8 by default. The new XMPP spec is even more strict about multi-language support.

So it should only be a matter of time and bug reports from non-us-ascii users before we see these other software packages updated.

Unfortunatly there’'s not much we can do but hope they get their software updated sooner rather than later. (or use all Jive software. heh)

-iain

Iain,

If I understand what you’‘re doing, I think you’‘re running into clients and servers that don’'t properly encode and decode UTF-8/Unicode. So when you insert characters outside of the us-ascii character range, they behave unpredictably

That is what I was thinking.

Messenger and Smack both use Java which is built from the ground up to support i18n

This is what I wanted to test.

Unfortunatly there’'s not much we can do

There is no problem. I’‘m just learning XMPP and testing Smack and Jive Messenger. I really don’‘t have any concrete requirement or necessity. I’'m just learning this stuff for any possible future need.

Thanks for you help.

Regards,

– Gato

Iain,

I can’'t find the link of “Glad Messenger”. Can you give the link to that software?

Thanks,

– Gato

Gato,

Sorry, that was a shortcut in speech. Properly I should have said “I am glad that Jive Messenger works better…” There is only Jive Messenger.

-iain