I started using xmpp-addr in Conversations (after using the full library in various other projects) and I noticed a weird behaviour with unicode vs punycode domains which I'm not sure is intentional.
If I create a Jid using it‘s punycode representation everything works as expected. If I output this jid using Jid.toString() I get the (normalized) unicode representation of that jid. However when I then put that string representation into Jid.of() again I get an IllegalArgumentException with invalid jid.
Consider the following code. That goes throws an exception in the third line.
Jid fromPunyCode = Jid.of("firstname.lastname@example.org"); System.out.println("jid: "+fromPunyCode.toString()); Jid fromUnicode = Jid.of(fromPunyCode.toString()); System.out.println("jid: "+fromUnicode.toString());
I'm honestly not really sure how unicode domains are supposed to work. If I'm reading the RFC correctly they should go in their unicode representation over the wire. Therefor Jid needs to be able to parse the unicode form and sort of only accept punycode as a bonus for easier user input.
Also since I'm unable to get the unicode representation out of the Jid class again I can't store the Jid object in a database.
Edit: I'm using 0.7.5 and briefly looked through the commit history but couldn't find anything. I apologize if this has already been addressed.