[tracker] tracker-miner-applications: separator of multi-string is also in UTF-8
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-miner-applications: separator of multi-string is also in UTF-8
- Date: Wed, 17 Nov 2010 15:37:48 +0000 (UTC)
commit c2803c1fedb2070f0fbff6114a1d8f50a8b52330
Author: Aleksander Morgado <aleksander lanedo com>
Date: Wed Nov 17 16:29:28 2010 +0100
tracker-miner-applications: separator of multi-string is also in UTF-8
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 22a563d..c4c777f 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]