summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2011-05-01 22:12:47 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2011-05-12 21:54:27 +0100
commit58f464fcbcb554680b6e81f38cd1acc300cb8add (patch)
tree2f94635d5d69a00d8d383331a9ea61b94de5c720
parentbaab490aa6015780e0c655c282fa069a6e87bb9f (diff)
downloadfolks-0-4.tar.gz
Bug 649088 — Combining contacts doesn't work with german Umlautsfolks-0-4
Fix normalisation of Jabber IDs to use the correct Unicode normalisation mode as described in RFC 3920, §A.4. Closes: bgo#649088
-rw-r--r--NEWS1
-rw-r--r--folks/im-details.vala14
2 files changed, 8 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index afb32300..9705249c 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ Bugs fixed:
* Bug 647562 — Don't crash on duplicate group channels
* Bug 647121 — Crash in individual_store_contact_sort at
empathy-individual-store.c line 1387
+* Bug 649088 — Combining contacts doesn't work with german Umlauts
Overview of changes from libfolks 0.4.1 to libfolks 0.4.2
=========================================================
diff --git a/folks/im-details.vala b/folks/im-details.vala
index e7522a09..8583f86a 100644
--- a/folks/im-details.vala
+++ b/folks/im-details.vala
@@ -80,16 +80,14 @@ public interface Folks.ImDetails : Object
public static string normalise_im_address (string im_address, string protocol)
throws Folks.ImDetailsError
{
- string normalised;
-
if (protocol == "aim" || protocol == "myspace")
{
- normalised = im_address.replace (" ", "").down ();
+ return im_address.replace (" ", "").down ().normalize ();
}
else if (protocol == "irc" || protocol == "yahoo" ||
protocol == "yahoojp" || protocol == "groupwise")
{
- normalised = im_address.down ();
+ return im_address.down ().normalize ();
}
else if (protocol == "jabber")
{
@@ -145,6 +143,8 @@ public interface Folks.ImDetails : Object
node = node.down ();
/* Build a new JID */
+ string normalised = null;
+
if (node != null && resource != null)
{
normalised = "%s@%s/%s".printf (node, domain, resource);
@@ -164,13 +164,13 @@ public interface Folks.ImDetails : Object
_("The IM address '%s' could not be understood."),
im_address);
}
+
+ return normalised.normalize (-1, NormalizeMode.NFKC);
}
else
{
/* Fallback */
- normalised = im_address;
+ return im_address.normalize ();
}
-
- return normalised.normalize ();
}
}