Index: bug-buddy-import.pl
===================================================================
RCS file: /cvs/gnome/bugzilla-new/bug-buddy-import.pl,v
retrieving revision 1.14
diff -u -r1.14 bug-buddy-import.pl
--- bug-buddy-import.pl	19 Mar 2005 17:46:04 -0000	1.14
+++ bug-buddy-import.pl	18 Apr 2005 19:33:42 -0000
@@ -66,6 +66,7 @@
 use Data::Dumper;
 $Data::Dumper::Useqq = 1;
 use MIME::Base64;
+use Encode;
 
 require "CGI.pl";
 require "globals.pl";
@@ -74,6 +75,11 @@
 ConnectToDatabase();
 GetVersionTable();
 
+# XXX - Bugzilla.gnome.org: ugly workaround to make UTF-8 work
+if (exists $ENV{LANG}) {
+	$ENV{LANG} =~ s/\.UTF-8//;
+}
+
 
 sub sillyness {
     my $zz;
@@ -291,7 +297,7 @@
       my $encoding = $tree->[1][$cur][$i+1][0]->{'encoding'};
       if (defined $encoding) {
         if ($encoding eq 'base64') {
-          $bug_fields{'short_desc'} = MIME::Base64::decode_base64 ($bug_fields{'short_desc'});
+          $bug_fields{'short_desc'} = Encode::decode('utf8', MIME::Base64::decode_base64 ($bug_fields{'short_desc'}), Encode::FB_PERLQQ);
         } elsif ($encoding ne 'text') {
           $err .= "Unknown encoding \"$encoding\"\n";
         }
@@ -318,7 +324,7 @@
       if (defined $encoding) {
         $long_desc {'thetext'} = '' unless defined $long_desc {'thetext'};
         if ($encoding eq 'base64') {
-          $long_desc{'thetext'} = MIME::Base64::decode_base64 ($long_desc {'thetext'});
+          $long_desc{'thetext'} = Encode::decode('utf8', MIME::Base64::decode_base64 ($long_desc {'thetext'}), Encode::FB_PERLQQ);
         } else {
           $err .= "Unknown encoding \"$encoding\"\n";
         }
