|
commit d9ce4b51edf5ccdbb5a9f6e39235645f87d4c4d8 |
|
|
Author: dmorgan <dmorgan@localhost.(none)> |
|
|
Date: Sun Jun 19 16:40:48 2011 +0200 |
|
|
|
|
|
(fc) fix for non UTF-8 locale |
|
|
|
|
1 |
diff --git a/src/applet/applet.c b/src/applet/applet.c |
diff --git a/src/applet/applet.c b/src/applet/applet.c |
2 |
index e965a3b..eb01b06 100644 |
index 0adb352..ce88843 100644 |
3 |
--- a/src/applet/applet.c |
--- a/src/applet/applet.c |
4 |
+++ b/src/applet/applet.c |
+++ b/src/applet/applet.c |
5 |
@@ -212,6 +212,7 @@ int main(int argc, char** argv) |
@@ -714,6 +714,7 @@ int main(int argc, char** argv) |
6 |
#if ENABLE_NLS |
#if ENABLE_NLS |
7 |
bindtextdomain(PACKAGE, LOCALEDIR); |
bindtextdomain(PACKAGE, LOCALEDIR); |
8 |
textdomain(PACKAGE); |
textdomain(PACKAGE); |
9 |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
10 |
#endif |
#endif |
11 |
|
|
12 |
/* Need to be thread safe */ |
/* Glib 2.31: |
13 |
diff --git a/src/cli/cli.c b/src/cli/cli.c |
diff --git a/src/cli/abrt-cli.c b/src/cli/abrt-cli.c |
14 |
index 3981c1b..a3645f5 100644 |
index 2ea5276..ba9710d 100644 |
15 |
--- a/src/cli/cli.c |
--- a/src/cli/abrt-cli.c |
16 |
+++ b/src/cli/cli.c |
+++ b/src/cli/abrt-cli.c |
17 |
@@ -134,6 +134,7 @@ int main(int argc, char** argv) |
@@ -132,6 +132,7 @@ int main(int argc, const char **argv) |
18 |
#if ENABLE_NLS |
#if ENABLE_NLS |
19 |
bindtextdomain(PACKAGE, LOCALEDIR); |
bindtextdomain(PACKAGE, LOCALEDIR); |
20 |
textdomain(PACKAGE); |
textdomain(PACKAGE); |
21 |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
22 |
#endif |
#endif |
23 |
|
|
24 |
GList *D_list = NULL; |
argv++; |
25 |
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c |
diff --git a/src/daemon/abrt-dbus.c b/src/daemon/abrt-dbus.c |
26 |
index 7a1ab31..2f6ba9d 100644 |
index 756076a..154415c 100644 |
27 |
--- a/src/daemon/abrtd.c |
--- a/src/daemon/abrt-dbus.c |
28 |
+++ b/src/daemon/abrtd.c |
+++ b/src/daemon/abrt-dbus.c |
29 |
@@ -497,6 +497,7 @@ int main(int argc, char** argv) |
@@ -372,6 +372,7 @@ int main(int argc, char** argv) |
30 |
#if ENABLE_NLS |
#if ENABLE_NLS |
31 |
bindtextdomain(PACKAGE, LOCALEDIR); |
bindtextdomain(PACKAGE, LOCALEDIR); |
32 |
textdomain(PACKAGE); |
textdomain(PACKAGE); |
33 |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
34 |
#endif |
#endif |
35 |
|
|
36 |
if (getuid() != 0) |
const char *program_usage_string = _( |
37 |
diff --git a/src/gui-gtk/main.c b/src/gui-gtk/main.c |
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c |
38 |
index e9b175a..d750051 100644 |
index d3a759a..019c280 100644 |
39 |
--- a/src/gui-gtk/main.c |
--- a/src/daemon/abrtd.c |
40 |
+++ b/src/gui-gtk/main.c |
+++ b/src/daemon/abrtd.c |
41 |
@@ -198,6 +198,7 @@ int main(int argc, char **argv) |
@@ -623,6 +623,7 @@ int main(int argc, char** argv) |
42 |
#if ENABLE_NLS |
#if ENABLE_NLS |
43 |
bindtextdomain(PACKAGE, LOCALEDIR); |
bindtextdomain(PACKAGE, LOCALEDIR); |
44 |
textdomain(PACKAGE); |
textdomain(PACKAGE); |
45 |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
46 |
#endif |
#endif |
47 |
|
|
48 |
/* without this the name is set to argv[0] which confuses |
const char *program_usage_string = _( |
49 |
diff --git a/src/gui-wizard-gtk/main.c b/src/gui-wizard-gtk/main.c |
diff --git a/src/plugins/abrt-retrace-client.c b/src/plugins/abrt-retrace-client.c |
50 |
index d1341b4..5ee1cb9 100644 |
index 0760708..7bdd8b9 100644 |
51 |
--- a/src/gui-wizard-gtk/main.c |
--- a/src/plugins/abrt-retrace-client.c |
52 |
+++ b/src/gui-wizard-gtk/main.c |
+++ b/src/plugins/abrt-retrace-client.c |
53 |
@@ -67,6 +67,7 @@ int main(int argc, char **argv) |
@@ -1287,6 +1287,7 @@ int main(int argc, char **argv) |
54 |
#if ENABLE_NLS |
#if ENABLE_NLS |
55 |
bindtextdomain(PACKAGE, LOCALEDIR); |
bindtextdomain(PACKAGE, LOCALEDIR); |
56 |
textdomain(PACKAGE); |
textdomain(PACKAGE); |
57 |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
58 |
#endif |
#endif |
59 |
|
|
60 |
gtk_init(&argc, &argv); |
abrt_init(argv); |
|
diff --git a/src/plugins/abrt-action-analyze-core.py b/src/plugins/abrt-action-analyze-core.py |
|
|
index 06473c4..00d7bf8 100755 |
|
|
--- a/src/plugins/abrt-action-analyze-core.py |
|
|
+++ b/src/plugins/abrt-action-analyze-core.py |
|
|
@@ -49,8 +49,8 @@ def init_gettext(): |
|
|
except locale.Error: |
|
|
os.environ['LC_ALL'] = 'C' |
|
|
locale.setlocale(locale.LC_ALL, "") |
|
|
- gettext.bind_textdomain_codeset(GETTEXT_PROGNAME, locale.nl_langinfo(locale.CODESET)) |
|
|
gettext.bindtextdomain(GETTEXT_PROGNAME, '/usr/share/locale') |
|
|
+ gettext.bind_textdomain_codeset(GETTEXT_PROGNAME, "UTF-8") |
|
|
gettext.textdomain(GETTEXT_PROGNAME) |
|
|
|
|
|
#eu_unstrip_OUT=`eu-unstrip "--core=$core" -n 2>eu_unstrip.ERR` |
|
|
diff --git a/src/plugins/abrt-action-install-debuginfo.py b/src/plugins/abrt-action-install-debuginfo.py |
|
|
index a796848..3cd5ef8 100755 |
|
|
--- a/src/plugins/abrt-action-install-debuginfo.py |
|
|
+++ b/src/plugins/abrt-action-install-debuginfo.py |
|
|
@@ -32,8 +32,8 @@ def init_gettext(): |
|
|
except locale.Error: |
|
|
os.environ['LC_ALL'] = 'C' |
|
|
locale.setlocale(locale.LC_ALL, "") |
|
|
- gettext.bind_textdomain_codeset(GETTEXT_PROGNAME, locale.nl_langinfo(locale.CODESET)) |
|
|
gettext.bindtextdomain(GETTEXT_PROGNAME, '/usr/share/locale') |
|
|
+ gettext.bind_textdomain_codeset(GETTEXT_PROGNAME, "UTF-8") |
|
|
gettext.textdomain(GETTEXT_PROGNAME) |
|
|
|
|
|
|
|