diff -Nru elen-old/admin/export.php elen/admin/export.php
--- elen-old/admin/export.php	2005-03-10 10:33:02.000000000 +0100
+++ elen/admin/export.php	2005-03-10 10:30:30.000000000 +0100
@@ -256,29 +256,27 @@
 
 //HERE WE EXPORT THE ACTUAL RESULTS
 
-if ($type == "doc") 
-	{
-	header("Content-Disposition: attachment; filename=survey.doc");
-	header("Content-type: application/vnd.ms-word");
-	$s="\t";
-	}
-elseif ($type == "xls") 
-	{
-	header("Content-Disposition: attachment; filename=survey.xls");
-	header("Content-type: application/vnd.ms-excel");
-	$s="\t";
-	}
-elseif ($type == "csv") 
-	{
-	header("Content-Disposition: attachment; filename=survey.csv");
-	header("Content-Type: application/download");
-	$s=",";
-	}
-else 
-	{
-	header("Content-Disposition: attachment; filename=survey.doc");
-	}
-sendcacheheaders();
+sendcacheheaders();             // sending "cache headers" before this permit us to send something else than a "text/html" content-type
+switch ( $_POST["type"] ) {     // this is a step to register_globals = false ;c)
+case "doc":
+        header("Content-Disposition: attachment; filename=survey.doc");
+        header("Content-type: application/vnd.ms-word");
+        $s="\t";
+        break;
+case "xls":
+        header("Content-Disposition: attachment; filename=survey.xls");
+        header("Content-type: application/vnd.ms-excel");
+        $s="\t";
+        break;
+case "csv":
+        header("Content-Disposition: attachment; filename=survey.csv");
+        header("Content-type: text/comma-separated-values; charset=ISO-8859-15");
+        $s=",";
+        break;
+default:
+        header("Content-Disposition: attachment; filename=survey.doc");
+        break;
+}
 
 //Select public language file
 $query = "SELECT language FROM {$dbprefix}surveys WHERE sid=$sid";

