1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
From c0f298d3db5202d1e6de7e093923f396116eefc6 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Fri, 20 Jul 2012 10:46:33 -0400
Subject: [PATCH] FTS parser: ICU cannot handle locale descriptions of > 157
characters
ICU's unicode/uloc.h #defines ULOC_FULLNAME_CAPACITY as 157. If a locale
description cannot fit in a buffer of size ULOC_FULLNAME_CAPACITY,
ubrk_open(UBRK_WORD, locale, ...) will fail when attempring to
canonicalize the locale string.
To avoid this, we must not pass setlocale(LC_ALL, NULL) to ICU since that
can easily be >200 chars for common locales. Instead, limit ourselves to
LC_CTYPE, since after all, that's all we need to determine word
boundaries.
https://bugzilla.gnome.org/show_bug.cgi?id=675660
---
src/libtracker-fts/tracker-parser-libicu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/libtracker-fts/tracker-parser-libicu.c b/src/libtracker-fts/tracker-parser-libicu.c
index 7388f69..69f75ed 100644
--- a/src/libtracker-fts/tracker-parser-libicu.c
+++ b/src/libtracker-fts/tracker-parser-libicu.c
@@ -676,7 +676,7 @@ tracker_parser_reset (TrackerParser *parser,
/* Open word-break iterator */
parser->bi = ubrk_open(UBRK_WORD,
- setlocale (LC_ALL, NULL),
+ setlocale (LC_CTYPE, NULL),
parser->utxt,
parser->utxt_size,
&error);
--
1.7.8.6
|