Punycode and Unicode with Internationalized Domain Names
This affects Gajim in Python 3.
There's a problem communicating with JIDs with Internationalized Domain Names (IDN).
Gajim will always translate the domain to ACE (punycode) while clients such as Conversations will use Unicode.
We produced this issue by having a JID with an IDN on a Conversations client.
The result is that Gajim can't send to Conversations because Gajim systematically translates the IDN to punycode. Even when adding a contact, the domain gets translated. The server that manages the IDN will think that the stanza is for a user that doesn't exist and will drop it.
I patched Gajim to have it always use Unicode and this resolved the issue.
But, we didn't know which party was doing it wrong. If we look at rfc7622 section 3.2.1 we can read:
An entity that prepares a string for inclusion in an XMPP domainpart slot MUST ensure that the string consists only of Unicode code points that are allowed in NR-LDH labels or U-labels as defined in [RFC5890]. This implies that the string MUST NOT include A-labels as defined in [RFC5890]; each A-label MUST be converted to a U-label during preparation of a string for inclusion in a domainpart slot. In addition, the string MUST be encoded as UTF-8 [RFC3629].
It seems to me that this means that XMPP clients should always use Unicode when sending over the wire and that therefore it is Gajim that must be fixed. Please advise.