pidgin: e2bd1ca5: For JIDs, do strdown before normalizatio...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Wed Jul 15 22:26:19 EDT 2009
-----------------------------------------------------------------
Revision: e2bd1ca5e990f4f054c74681fd5bdd815c0ff7fe
Ancestor: 4d3247a3525876e8e2a852d7d91a42339ece6b4a
Author: darkrain42 at pidgin.im
Date: 2009-07-15T22:41:52
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e2bd1ca5e990f4f054c74681fd5bdd815c0ff7fe
Modified files:
libpurple/protocols/jabber/jutil.c
ChangeLog:
For JIDs, do strdown before normalization.
Having looked at the code for g_utf8_strdown(), this seems like it might
help with the locale-dependence issues, although I'm not entirely sure.
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jutil.c 5fe1d61e21bbdf94452394f14657d757efa5c375
+++ libpurple/protocols/jabber/jutil.c 3d12ef22d088f461538457a736d13787dce3ee56
@@ -257,29 +257,29 @@ jabber_id_new(const char *str)
/* normalization */
if(at) {
- node = g_utf8_normalize(str, at-str, G_NORMALIZE_NFKC);
+ node = g_utf8_strdown(str, at-str);
if(slash) {
- domain = g_utf8_normalize(at+1, slash-(at+1), G_NORMALIZE_NFKC);
+ domain = g_utf8_strdown(at+1, slash-(at+1));
jid->resource = g_utf8_normalize(slash+1, -1, G_NORMALIZE_NFKC);
} else {
- domain = g_utf8_normalize(at+1, -1, G_NORMALIZE_NFKC);
+ domain = g_utf8_strdown(at+1, -1);
}
} else {
if(slash) {
- domain = g_utf8_normalize(str, slash-str, G_NORMALIZE_NFKC);
+ domain = g_utf8_strdown(str, slash-str);
jid->resource = g_utf8_normalize(slash+1, -1, G_NORMALIZE_NFKC);
} else {
- domain = g_utf8_normalize(str, -1, G_NORMALIZE_NFKC);
+ domain = g_utf8_strdown(str, -1);
}
}
if (node) {
- jid->node = g_utf8_strdown(node, -1);
+ jid->node = g_utf8_normalize(node, -1, G_NORMALIZE_NFKC);
g_free(node);
}
if (domain) {
- jid->domain = g_utf8_strdown(domain, -1);
+ jid->domain = g_utf8_normalize(domain, -1, G_NORMALIZE_NFKC);
g_free(domain);
}
More information about the Commits
mailing list