1 |
commit d9ce4b51edf5ccdbb5a9f6e39235645f87d4c4d8 |
2 |
Author: dmorgan <dmorgan@localhost.(none)> |
3 |
Date: Sun Jun 19 16:40:48 2011 +0200 |
4 |
|
5 |
(fc) fix for non UTF-8 locale |
6 |
|
7 |
diff --git a/src/applet/applet.c b/src/applet/applet.c |
8 |
index e965a3b..eb01b06 100644 |
9 |
--- a/src/applet/applet.c |
10 |
+++ b/src/applet/applet.c |
11 |
@@ -212,6 +212,7 @@ int main(int argc, char** argv) |
12 |
#if ENABLE_NLS |
13 |
bindtextdomain(PACKAGE, LOCALEDIR); |
14 |
textdomain(PACKAGE); |
15 |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
16 |
#endif |
17 |
|
18 |
/* Need to be thread safe */ |
19 |
diff --git a/src/cli/cli.c b/src/cli/cli.c |
20 |
index 3981c1b..a3645f5 100644 |
21 |
--- a/src/cli/cli.c |
22 |
+++ b/src/cli/cli.c |
23 |
@@ -134,6 +134,7 @@ int main(int argc, char** argv) |
24 |
#if ENABLE_NLS |
25 |
bindtextdomain(PACKAGE, LOCALEDIR); |
26 |
textdomain(PACKAGE); |
27 |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
28 |
#endif |
29 |
|
30 |
GList *D_list = NULL; |
31 |
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c |
32 |
index 7a1ab31..2f6ba9d 100644 |
33 |
--- a/src/daemon/abrtd.c |
34 |
+++ b/src/daemon/abrtd.c |
35 |
@@ -497,6 +497,7 @@ int main(int argc, char** argv) |
36 |
#if ENABLE_NLS |
37 |
bindtextdomain(PACKAGE, LOCALEDIR); |
38 |
textdomain(PACKAGE); |
39 |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
40 |
#endif |
41 |
|
42 |
if (getuid() != 0) |
43 |
diff --git a/src/gui-gtk/main.c b/src/gui-gtk/main.c |
44 |
index e9b175a..d750051 100644 |
45 |
--- a/src/gui-gtk/main.c |
46 |
+++ b/src/gui-gtk/main.c |
47 |
@@ -198,6 +198,7 @@ int main(int argc, char **argv) |
48 |
#if ENABLE_NLS |
49 |
bindtextdomain(PACKAGE, LOCALEDIR); |
50 |
textdomain(PACKAGE); |
51 |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
52 |
#endif |
53 |
|
54 |
/* without this the name is set to argv[0] which confuses |
55 |
diff --git a/src/gui-wizard-gtk/main.c b/src/gui-wizard-gtk/main.c |
56 |
index d1341b4..5ee1cb9 100644 |
57 |
--- a/src/gui-wizard-gtk/main.c |
58 |
+++ b/src/gui-wizard-gtk/main.c |
59 |
@@ -67,6 +67,7 @@ int main(int argc, char **argv) |
60 |
#if ENABLE_NLS |
61 |
bindtextdomain(PACKAGE, LOCALEDIR); |
62 |
textdomain(PACKAGE); |
63 |
+ bind_textdomain_codeset(PACKAGE, "UTF-8"); |
64 |
#endif |
65 |
|
66 |
gtk_init(&argc, &argv); |
67 |
diff --git a/src/plugins/abrt-action-analyze-core.py b/src/plugins/abrt-action-analyze-core.py |
68 |
index 06473c4..00d7bf8 100755 |
69 |
--- a/src/plugins/abrt-action-analyze-core.py |
70 |
+++ b/src/plugins/abrt-action-analyze-core.py |
71 |
@@ -49,8 +49,8 @@ def init_gettext(): |
72 |
except locale.Error: |
73 |
os.environ['LC_ALL'] = 'C' |
74 |
locale.setlocale(locale.LC_ALL, "") |
75 |
- gettext.bind_textdomain_codeset(GETTEXT_PROGNAME, locale.nl_langinfo(locale.CODESET)) |
76 |
gettext.bindtextdomain(GETTEXT_PROGNAME, '/usr/share/locale') |
77 |
+ gettext.bind_textdomain_codeset(GETTEXT_PROGNAME, "UTF-8") |
78 |
gettext.textdomain(GETTEXT_PROGNAME) |
79 |
|
80 |
#eu_unstrip_OUT=`eu-unstrip "--core=$core" -n 2>eu_unstrip.ERR` |
81 |
diff --git a/src/plugins/abrt-action-install-debuginfo.py b/src/plugins/abrt-action-install-debuginfo.py |
82 |
index a796848..3cd5ef8 100755 |
83 |
--- a/src/plugins/abrt-action-install-debuginfo.py |
84 |
+++ b/src/plugins/abrt-action-install-debuginfo.py |
85 |
@@ -32,8 +32,8 @@ def init_gettext(): |
86 |
except locale.Error: |
87 |
os.environ['LC_ALL'] = 'C' |
88 |
locale.setlocale(locale.LC_ALL, "") |
89 |
- gettext.bind_textdomain_codeset(GETTEXT_PROGNAME, locale.nl_langinfo(locale.CODESET)) |
90 |
gettext.bindtextdomain(GETTEXT_PROGNAME, '/usr/share/locale') |
91 |
+ gettext.bind_textdomain_codeset(GETTEXT_PROGNAME, "UTF-8") |
92 |
gettext.textdomain(GETTEXT_PROGNAME) |
93 |
|
94 |
|