The CGIs don't set the charset; this causes Firefox to guess the character
set wrong sometimes, for example when I get spam with the subject in
Chinese or Hebrew; now that we're talking about it, sanitizing the
characters in the sender and subject would also be a good idea, methinks.

The author or authors of this submission hereby release any and all
copyright interest in this code, documentation, or other materials
included to the DSPAM project and its primary governors. We intend this
relinquishment of copyright interest in perpetuity of all present and
future rights to said submission under copyright law.

---
 admin.cgi |    2 +-
 dspam.cgi |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/admin.cgi b/admin.cgi
index 8b1147f..1a37038 100755
--- a/admin.cgi
+++ b/admin.cgi
@@ -586,7 +586,7 @@ sub output {
   print "Expires: now\n";
   print "Pragma: no-cache\n";
   print "Cache-control: no-cache\n";
-  print "Content-type: text/html\n\n";
+  print "Content-type: text/html; charset=ISO-8859-1\n\n";
   my(%DATA) = @_;
   $DATA{'WEB_ROOT'} = $CONFIG{'WEB_ROOT'};
 
diff --git a/dspam.cgi b/dspam.cgi
index 513a6a2..159fb27 100755
--- a/dspam.cgi
+++ b/dspam.cgi
@@ -1418,7 +1418,7 @@ sub output {
   print "Expires: now\n";
   print "Pragma: no-cache\n";
   print "Cache-control: no-cache\n";
-  print "Content-type: text/html\n\n";
+  print "Content-type: text/html; charset=ISO-8859-1\n\n";
   my(%DATA) = @_;
   $DATA{'WEB_ROOT'} = $CONFIG{'WEB_ROOT'};
 


Reply via email to