Implementation of IDNs in JIDs as specified in RFC 6122

97 views Asked by At

I have added International Domain Name support to an XMPP client as specified in RFC 6122. In the RFC it states:

Although XMPP applications do not communicate the output of the ToASCII operation (called an "ACE label") over the wire, it MUST be possible to apply that operation without failing to each internationalized label.

However, with the domain I have available for testing (running Prosody 0.9.4; working on getting feedback from someone else about how Ejabberd handles this), sending a Unicode name in the "to" field of an XMPP stanza causes them to immediately return an XMPP error stanza and terminate the stream. If I apply the toASCII operation before sending the stanza, the connection succeedes, and I can begin authentication with the server.

So sending:

<somestanza to="éxample.net"/>

Would cause an error, while:

<somestanza to="xn--xample-9ua.net"/>

works fine.

Is it correct to send the ASCII representation (ACE label) of the domain like this? If so, what does the spec mean when it says that "XMPP applications do not communicate the output of the ToASCII operation ... over the wire"? If not, how can I ensure compatibility with misbehaving servers?

0

There are 0 answers