aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-11-12 23:01:04 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-11-12 23:01:04 +0100
commita74fa9c930d76f8eb24d1c63197908fff5828b7d (patch)
treede9c4eff826f94b495e649f64bc3c41322bd812c /src
parente555fe4b033d2ad342d757217bb59704ad8207f9 (diff)
parent2222483b426769b8675106c0b9343ecac0653ea9 (diff)
Merge pull request #659 from SamWhited/jidfixes
Make sure we're storing the display JID as Unicode
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/jid/Jid.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/jid/Jid.java b/src/main/java/eu/siacs/conversations/xmpp/jid/Jid.java
index 3ad3015d..d8d8e375 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/jid/Jid.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/jid/Jid.java
@@ -108,11 +108,12 @@ public final class Jid {
if (resourcepart.isEmpty() || resourcepart.length() > 1023) {
throw new InvalidJidException(InvalidJidException.INVALID_PART_LENGTH);
}
- dp = jid.substring(domainpartStart, slashLoc);
+ dp = IDN.toUnicode(jid.substring(domainpartStart, slashLoc), IDN.USE_STD3_ASCII_RULES);
finaljid = finaljid + dp + "/" + rp;
} else {
resourcepart = "";
- dp = jid.substring(domainpartStart, jid.length());
+ dp = IDN.toUnicode(jid.substring(domainpartStart, jid.length()),
+ IDN.USE_STD3_ASCII_RULES);
finaljid = finaljid + dp;
}