diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2010-11-17 16:29:28 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2010-11-17 16:37:42 +0100 |
commit | c2803c1fedb2070f0fbff6114a1d8f50a8b52330 (patch) | |
tree | 1e4237392065989f3845ce316f9ac03b49b02733 | |
parent | 296a6fc559a6fb01c490dcbc8ddbc4592ab6b6b5 (diff) | |
download | tracker-c2803c1fedb2070f0fbff6114a1d8f50a8b52330.tar.gz |
tracker-miner-applications: separator of multi-string is also in UTF-8
-rw-r--r-- | src/miners/fs/tracker-miner-applications-meego.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/miners/fs/tracker-miner-applications-meego.cpp b/src/miners/fs/tracker-miner-applications-meego.cpp index 22a563d15..c4c777f42 100644 --- a/src/miners/fs/tracker-miner-applications-meego.cpp +++ b/src/miners/fs/tracker-miner-applications-meego.cpp @@ -52,11 +52,15 @@ tracker_miner_applications_meego_translate (const gchar *catalogue, locale.installTrCatalog (catalogue); MLocale::setDefault (locale); - GStrv split; - split = g_strsplit (qtTrId (id). toUtf8 ().data (), "\x9C", 2); + gchar *ret = g_strdup (qtTrId (id). toUtf8 ().data ()); - gchar *ret = g_strdup (split[0]); - g_strfreev (split); + /* We only want the first string of the multi-string, so if + * the separator character is found (encoded as C2:9C in UTF-8), + * we just end the string in that point */ + gchar *next_string = strstr (ret, "\xC2\x9C"); + if (next_string) { + *next_string = '\0'; + } return ret; } |