Index: general.pl.in
===================================================================
RCS file: /cvs/gnome/system-tools-backends/general.pl.in,v
retrieving revision 1.46
diff -u -r1.46 general.pl.in
--- general.pl.in	14 Jul 2004 16:57:29 -0000	1.46
+++ general.pl.in	12 Feb 2005 07:37:00 -0000
@@ -45,7 +45,13 @@
 if ($has_i18n)
 {
   # set up i18n stuff
-  &setlocale (LC_MESSAGES, "");
+  my $cur_locale = &setlocale (LC_MESSAGES, "");
+  # ensure UTF-8 locale, for appropriate encoding of translated messages
+  unless ($cur_locale =~ /.+\.UTF-8.*/ || $cur_locale =~ /.+\.utf-8.*/) {
+    $cur_locale =~ s/\.[A-Za-z0-9-]+//;
+    $cur_locale =~ s/([a-z]+(_[A-Z]+)?)/$1.UTF-8/;
+    &setlocale (LC_MESSAGES, "$cur_locale");
+  }
   &bindtextdomain ("@GETTEXT_PACKAGE@", "@localedir@");
   &textdomain ("@GETTEXT_PACKAGE@");
 
