[tracker/rss-enclosures] tracker-miner-applications: separator of multi-string is also in UTF-8
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] tracker-miner-applications: separator of multi-string is also in UTF-8
- Date: Wed, 24 Nov 2010 02:34:22 +0000 (UTC)
commit 61c4318f83062aab4f960333db821df8c9125fe5
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]