diff --git a/mozilla/webtools/bonsai/CGI.pl b/mozilla/webtools/bonsai/CGI.pl
index 74a57b1c5be..5a1dcc25fde 100644
--- a/mozilla/webtools/bonsai/CGI.pl
+++ b/mozilla/webtools/bonsai/CGI.pl
@@ -387,7 +387,7 @@ sub FormData {
sub CheckEmailSyntax {
my ($addr) = (@_);
if ($addr !~ /^[^@, ]*@[^@, ]*\.[^@, ]*$/) {
- print "Content-type: text/html\n\n";
+ print "Content-Type: text/html; charset=UTF-8\n\n";
print "
Invalid e-mail address entered.
\n";
print "The e-mail address you entered\n";
@@ -409,7 +409,7 @@ sub CheckEmailSyntax {
$| = 1;
# Uncommenting this next line can help debugging.
-# print "Content-type: text/html\n\nHello mom\n";
+# print "Content-Type: text/html; charset=UTF-8\n\nHello mom\n";
# foreach my $k (sort(keys %ENV)) {
# print "$k $ENV{$k}
\n";
diff --git a/mozilla/webtools/bonsai/admin.cgi b/mozilla/webtools/bonsai/admin.cgi
index 3309fad7bc1..2baf13043da 100755
--- a/mozilla/webtools/bonsai/admin.cgi
+++ b/mozilla/webtools/bonsai/admin.cgi
@@ -39,7 +39,7 @@ Unlock();
my $BIP = BatchIdPart('?');
my $BIP_nohook = BatchIdPart();
-print "Content-type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
PutsHeader("Bonsai Administration [`$::TreeID' Tree]",
"Bonsai Administration",
"Administrating `$::TreeID' Tree");
diff --git a/mozilla/webtools/bonsai/closemessage b/mozilla/webtools/bonsai/closemessage
index 997eb53b7fc..5b5fcc6b1c8 100644
--- a/mozilla/webtools/bonsai/closemessage
+++ b/mozilla/webtools/bonsai/closemessage
@@ -2,7 +2,7 @@ From: bonsai-daemon
To: %name%
Subject: [Bonsai] Hey! You checked in while the tree was closed!
Mime-Version: 1.0
-Content-Type: text/html
+Content-Type: text/html; charset=UTF-8
diff --git a/mozilla/webtools/bonsai/countcheckins.cgi b/mozilla/webtools/bonsai/countcheckins.cgi
index 6accb63d711..2b86756746b 100755
--- a/mozilla/webtools/bonsai/countcheckins.cgi
+++ b/mozilla/webtools/bonsai/countcheckins.cgi
@@ -26,7 +26,7 @@ require 'CGI.pl';
use vars qw($CloseTimeStamp);
-print "Content-type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
LoadCheckins();
my $maxsize = 400;
diff --git a/mozilla/webtools/bonsai/cvsblame.cgi b/mozilla/webtools/bonsai/cvsblame.cgi
index f042fa117c4..64dd8d9bc57 100755
--- a/mozilla/webtools/bonsai/cvsblame.cgi
+++ b/mozilla/webtools/bonsai/cvsblame.cgi
@@ -57,7 +57,7 @@ require 'cvsblame.pl';
# Cope with the cookie and print the header, first thing. That way, if
# any errors result, they will show up for the user.
-print "Content-Type:text/html\n";
+print "Content-Type: text/html; charset=UTF-8\n";
if ($ENV{REQUEST_METHOD} eq 'POST' and defined $::FORM{set_line}) {
# Expire the cookie 5 months from now
print "Set-Cookie: line_nums="
diff --git a/mozilla/webtools/bonsai/cvsgraph.cgi b/mozilla/webtools/bonsai/cvsgraph.cgi
index 3664849443a..c73a56baebe 100755
--- a/mozilla/webtools/bonsai/cvsgraph.cgi
+++ b/mozilla/webtools/bonsai/cvsgraph.cgi
@@ -33,7 +33,7 @@ sub print_top {
my ($title) = @_;
$title ||= "Error";
- print "Content-type: text/html\n\n";
+ print "Content-Type: text/html; charset=UTF-8\n\n";
print "\n";
print "\n\n";
print " $title\n";
diff --git a/mozilla/webtools/bonsai/cvsguess.cgi b/mozilla/webtools/bonsai/cvsguess.cgi
index 68a2aba4fbb..e501e37657b 100755
--- a/mozilla/webtools/bonsai/cvsguess.cgi
+++ b/mozilla/webtools/bonsai/cvsguess.cgi
@@ -30,7 +30,7 @@ my $ln = (($mark =~ m/^\d+$/ && $mark > 10) ? $mark-10 : 1 );
my $rev = &SanitizeRevision($::FORM{'rev'});
my $debug = $::FORM{'debug'};
-print "Content-Type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
my $CVS_ROOT = $::FORM{'root'};
if( !defined($CVS_ROOT) || $CVS_ROOT eq '' ){
diff --git a/mozilla/webtools/bonsai/cvslog.cgi b/mozilla/webtools/bonsai/cvslog.cgi
index f229b7bef81..c6312c29b69 100755
--- a/mozilla/webtools/bonsai/cvslog.cgi
+++ b/mozilla/webtools/bonsai/cvslog.cgi
@@ -64,7 +64,7 @@ my $filename = '';
$filename = $::FORM{'file'} if defined($::FORM{'file'});
if ($filename eq '')
{
- print "Content-Type:text/html\n\n";
+ print "Content-Type: text/html; charset=UTF-8\n\n";
&print_usage;
PutsTrailer();
exit;
@@ -94,7 +94,7 @@ if (defined $root && $root ne '') {
if (-d $root) {
unshift(@src_roots, $root);
} else {
- print "Content-Type:text/html\n\n";
+ print "Content-Type: text/html; charset=UTF-8\n\n";
&print_top;
print "Error: Root, $root, is not a directory.
\n";
PutsTrailer();
@@ -119,7 +119,7 @@ foreach (@src_roots) {
# File not found
unless ($found_rcs_file) {
- print "Content-Type:text/html\n\n";
+ print "Content-Type: text/html; charset=UTF-8\n\n";
&print_top;
my $escaped_filename = html_quote($filename);
print "Rcs file, $escaped_filename, does not exist.
\n";
@@ -181,7 +181,7 @@ if ($ctype eq "rss") {
display_rss();
}
else {
- print "Content-Type: text/html\n\n";
+ print "Content-Type: text/html; charset=UTF-8\n\n";
display_html();
}
@@ -387,7 +387,7 @@ sub display_rss {
$link = value_quote($link);
print <<"END";
-
+
-
+
Regular expressions in the cvs query tool
diff --git a/mozilla/webtools/bonsai/cvsview2.cgi b/mozilla/webtools/bonsai/cvsview2.cgi
index 0fdf49bfdd5..f13c5f33336 100755
--- a/mozilla/webtools/bonsai/cvsview2.cgi
+++ b/mozilla/webtools/bonsai/cvsview2.cgi
@@ -56,12 +56,12 @@ sub sillyness {
}
my $request = new CGI;
+$request->charset('UTF-8');
sub http_die {
my ($str) = (@_);
print $request->header();
print "\n";
- print "Content-type: text/html\n\n";
die "$str\n";
}
diff --git a/mozilla/webtools/bonsai/doadmin.cgi b/mozilla/webtools/bonsai/doadmin.cgi
index d5abba66f38..4ef5790f5b9 100755
--- a/mozilla/webtools/bonsai/doadmin.cgi
+++ b/mozilla/webtools/bonsai/doadmin.cgi
@@ -26,7 +26,7 @@ use strict;
require 'CGI.pl';
require 'adminfuncs.pl';
-print "Content-type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
&validateReferer('admin.cgi');
CheckPassword(FormData('password'));
diff --git a/mozilla/webtools/bonsai/doeditcheckin.cgi b/mozilla/webtools/bonsai/doeditcheckin.cgi
index fa0e6cacee5..70dce769588 100755
--- a/mozilla/webtools/bonsai/doeditcheckin.cgi
+++ b/mozilla/webtools/bonsai/doeditcheckin.cgi
@@ -24,7 +24,7 @@ use strict;
require 'CGI.pl';
-print "Content-type: text/html
+print "Content-type: text/html; charset=UTF-8
";
diff --git a/mozilla/webtools/bonsai/doeditmessage.cgi b/mozilla/webtools/bonsai/doeditmessage.cgi
index 1e47967a684..01b1579d3bd 100755
--- a/mozilla/webtools/bonsai/doeditmessage.cgi
+++ b/mozilla/webtools/bonsai/doeditmessage.cgi
@@ -33,7 +33,7 @@ sub sillyness {
require 'CGI.pl';
-print "Content-type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
&validateReferer('editmessage.cgi');
CheckPassword(FormData('password'));
diff --git a/mozilla/webtools/bonsai/doeditparams.cgi b/mozilla/webtools/bonsai/doeditparams.cgi
index 19b795e046f..774f767209c 100755
--- a/mozilla/webtools/bonsai/doeditparams.cgi
+++ b/mozilla/webtools/bonsai/doeditparams.cgi
@@ -31,7 +31,7 @@ use vars %::param,
@::param_list;
-print "Content-type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
&validateReferer('editparams.cgi');
CheckPassword(FormData('password'));
diff --git a/mozilla/webtools/bonsai/doeditwhiteboard.cgi b/mozilla/webtools/bonsai/doeditwhiteboard.cgi
index 3591336b5db..5f4f6bf927a 100755
--- a/mozilla/webtools/bonsai/doeditwhiteboard.cgi
+++ b/mozilla/webtools/bonsai/doeditwhiteboard.cgi
@@ -23,7 +23,7 @@
use strict;
require 'CGI.pl';
-print "Content-type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
&validateReferer(('editwhiteboard.cgi','doeditwhiteboard.cgi'));
diff --git a/mozilla/webtools/bonsai/dotweak.cgi b/mozilla/webtools/bonsai/dotweak.cgi
index f1b9f5f226b..3cac93336f5 100755
--- a/mozilla/webtools/bonsai/dotweak.cgi
+++ b/mozilla/webtools/bonsai/dotweak.cgi
@@ -31,7 +31,7 @@ sub sillyness {
}
require 'CGI.pl';
-print "Content-type: text/html
+print "Content-type: text/html; charset=UTF-8
";
diff --git a/mozilla/webtools/bonsai/editcheckin.cgi b/mozilla/webtools/bonsai/editcheckin.cgi
index d625010fabb..c55ff7a3efc 100755
--- a/mozilla/webtools/bonsai/editcheckin.cgi
+++ b/mozilla/webtools/bonsai/editcheckin.cgi
@@ -38,7 +38,7 @@ require 'CGI.pl';
my $form_id = &ExpectCheckinId($::FORM{'id'});
my $info = eval("\\%" . $form_id);
-print "Content-type: text/html
+print "Content-type: text/html; charset=UTF-8
Say the magic word.
diff --git a/mozilla/webtools/bonsai/editmessage.cgi b/mozilla/webtools/bonsai/editmessage.cgi
index 10ca900fb47..b95ea32c9b1 100755
--- a/mozilla/webtools/bonsai/editmessage.cgi
+++ b/mozilla/webtools/bonsai/editmessage.cgi
@@ -32,7 +32,7 @@ sub sillyness {
require 'CGI.pl';
-print "Content-type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
my $Filename = FormData('msgname');
my $EscapedFilename = html_quote($Filename);
diff --git a/mozilla/webtools/bonsai/editparams.cgi b/mozilla/webtools/bonsai/editparams.cgi
index 70e6e418b82..8a28c136e3c 100755
--- a/mozilla/webtools/bonsai/editparams.cgi
+++ b/mozilla/webtools/bonsai/editparams.cgi
@@ -30,7 +30,7 @@ require "defparams.pl";
use vars @::param_desc,
@::param_list;
-print "Content-type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
#
# Check to ensure they've logged in properly
diff --git a/mozilla/webtools/bonsai/editwhiteboard.cgi b/mozilla/webtools/bonsai/editwhiteboard.cgi
index d75c85f7940..71fe1a5b5b2 100755
--- a/mozilla/webtools/bonsai/editwhiteboard.cgi
+++ b/mozilla/webtools/bonsai/editwhiteboard.cgi
@@ -32,7 +32,7 @@ sub sillyness {
require 'CGI.pl';
-print "Content-type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
LoadWhiteboard();
PutsHeader("Scritch, scritch.", "Edit Whiteboard");
diff --git a/mozilla/webtools/bonsai/moduleanalyse.cgi b/mozilla/webtools/bonsai/moduleanalyse.cgi
index b1f1e087cd2..e8f8374ba36 100755
--- a/mozilla/webtools/bonsai/moduleanalyse.cgi
+++ b/mozilla/webtools/bonsai/moduleanalyse.cgi
@@ -39,7 +39,7 @@ require 'CGI.pl';
$|=1;
-print "Content-type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
my $CVS_ROOT = $::FORM{'cvsroot'};
$CVS_ROOT = pickDefaultRepository() unless $CVS_ROOT;
diff --git a/mozilla/webtools/bonsai/multidiff.cgi b/mozilla/webtools/bonsai/multidiff.cgi
index 645550a46cb..a7cc1e6d048 100755
--- a/mozilla/webtools/bonsai/multidiff.cgi
+++ b/mozilla/webtools/bonsai/multidiff.cgi
@@ -36,7 +36,7 @@ my %form;
&validateReferer('cvsquery.cgi','showcheckins.cgi');
-print "Content-type: text/html
+print "Content-type: text/html; charset=UTF-8
";
diff --git a/mozilla/webtools/bonsai/openmessage b/mozilla/webtools/bonsai/openmessage
index 2095bbdf58f..b9970c335c3 100644
--- a/mozilla/webtools/bonsai/openmessage
+++ b/mozilla/webtools/bonsai/openmessage
@@ -2,7 +2,7 @@ From: bonsai-daemon
To: %name%
Subject: [Bonsai] You're on the hook now!
Mime-Version: 1.0
-Content-Type: text/html
+Content-Type: text/html; charset=UTF-8
diff --git a/mozilla/webtools/bonsai/rebuildcvshistory.cgi b/mozilla/webtools/bonsai/rebuildcvshistory.cgi
index 31c63676bc5..ddb1f76c23c 100755
--- a/mozilla/webtools/bonsai/rebuildcvshistory.cgi
+++ b/mozilla/webtools/bonsai/rebuildcvshistory.cgi
@@ -218,7 +218,7 @@ elsif ($#ARGV == 2) {
}
else {
- print "Content-type: text/html
+ print "Content-type: text/html; charset=UTF-8
";
CheckPassword(FormData('password'));
diff --git a/mozilla/webtools/bonsai/repophook.cgi b/mozilla/webtools/bonsai/repophook.cgi
index e7223607db1..f4e27d38a84 100755
--- a/mozilla/webtools/bonsai/repophook.cgi
+++ b/mozilla/webtools/bonsai/repophook.cgi
@@ -35,7 +35,7 @@ sub sillyness {
}
-print "Content-type: text/html
+print "Content-type: text/html; charset=UTF-8
";
diff --git a/mozilla/webtools/bonsai/rview.cgi b/mozilla/webtools/bonsai/rview.cgi
index 1211433a19b..f8466d62e4d 100755
--- a/mozilla/webtools/bonsai/rview.cgi
+++ b/mozilla/webtools/bonsai/rview.cgi
@@ -70,7 +70,7 @@ die "Invalid directory: " . &shell_escape($dir) . ".\n" if (! -d $path);
my $rev = &SanitizeRevision($::FORM{"rev"});
-print "Content-type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
my $registryurl = Param('registryurl');
diff --git a/mozilla/webtools/bonsai/showcheckins.cgi b/mozilla/webtools/bonsai/showcheckins.cgi
index ada306aedc0..6c7ecfd43f4 100755
--- a/mozilla/webtools/bonsai/showcheckins.cgi
+++ b/mozilla/webtools/bonsai/showcheckins.cgi
@@ -25,7 +25,7 @@ use strict;
require 'CGI.pl';
use vars qw(@TreeList);
-print "Content-type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
Lock();
LoadCheckins();
diff --git a/mozilla/webtools/bonsai/switchtree.cgi b/mozilla/webtools/bonsai/switchtree.cgi
index 6b07195e268..8f5a91b0d09 100755
--- a/mozilla/webtools/bonsai/switchtree.cgi
+++ b/mozilla/webtools/bonsai/switchtree.cgi
@@ -32,7 +32,7 @@ sub sillyness {
}
require 'CGI.pl';
-print "Content-type: text/html\n\n";
+print "Content-Type: text/html; charset=UTF-8\n\n";
LoadTreeConfig();
sub IsChecked {
diff --git a/mozilla/webtools/bonsai/toplevel.cgi b/mozilla/webtools/bonsai/toplevel.cgi
index 1c435faa852..95f8985b9ff 100755
--- a/mozilla/webtools/bonsai/toplevel.cgi
+++ b/mozilla/webtools/bonsai/toplevel.cgi
@@ -33,7 +33,7 @@ sub StupidFuncToShutUpWarningsByUsingVarsAgain {
$z = $::TreeList;
}
-print "Content-type: text/html\nRefresh: 300\n\n";
+print "Content-Type: text/html; charset=UTF-8\nRefresh: 300\n\n";
PutsHeader("Bonsai -- the art of effectively controlling trees",
"Bonsai", "CVS Tree Control");
diff --git a/mozilla/webtools/bonsai/viewold.cgi b/mozilla/webtools/bonsai/viewold.cgi
index d99ec25fed5..b4b342850b6 100755
--- a/mozilla/webtools/bonsai/viewold.cgi
+++ b/mozilla/webtools/bonsai/viewold.cgi
@@ -42,7 +42,7 @@ sub IsChecked {
}
}
-print "Content-type: text/html
+print "Content-type: text/html; charset=UTF-8
Let's do the time warp again...
diff --git a/mozilla/webtools/bonsai/whohastouchedwhat.cgi b/mozilla/webtools/bonsai/whohastouchedwhat.cgi
index f7dffb08860..970e8c71ecc 100755
--- a/mozilla/webtools/bonsai/whohastouchedwhat.cgi
+++ b/mozilla/webtools/bonsai/whohastouchedwhat.cgi
@@ -30,7 +30,7 @@ my $db = ConnectToDatabase();
$| = 1;
if (!defined $form{'repositoryid'}) {
- print "Content-type: text/html
+ print "Content-type: text/html; charset=UTF-8
This will create a cryptic report of all the people who have ever
touched each file within a directory heirarchy.