add encoding to html dump, and use crlf line endings
authorchriskl <chriskl>
Thu, 21 Aug 2003 04:54:54 +0000 (04:54 +0000)
committerchriskl <chriskl>
Thu, 21 Aug 2003 04:54:54 +0000 (04:54 +0000)
tblexport.php

index d7729ec0db90075b336183e3fa83871c4b7c0491..3431a6ae62fac7149383068a77f6adc2611f93a0 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Does an export to the screen or as a download
         *
-        * $Id: tblexport.php,v 1.11 2003/08/21 04:49:36 chriskl Exp $
+        * $Id: tblexport.php,v 1.12 2003/08/21 04:54:54 chriskl Exp $
         */
 
        $extensions = array(
                echo "</records>\n";
        }
        elseif ($_REQUEST['format'] == 'html') {
-               echo "<html>\n";
-               echo "<body>\n";
-               echo "<table class=\"phppgadmin\">\n";
-               echo "\t<tr>\n\t\t";
+               echo "<html>\r\n";
+               echo "<head>\r\n";
+               echo "\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$localData->codemap[$dbEncoding]}\" />\r\n";
+               echo "</head>\r\n";
+               echo "<body>\r\n";
+               echo "<table class=\"phppgadmin\">\r\n";
+               echo "\t<tr>\r\n\t\t";
                if (!$rs->EOF) {
                        // Output header row
                        $j = 0;
                                echo "<th>", $misc->printVal($k, true), "</th>";
                        }
                }
-               echo "\n\t</tr>\n";
+               echo "\r\n\t</tr>\r\n";
                while (!$rs->EOF) {
-                       echo "\t<tr>\n\t\t";
+                       echo "\t<tr>\r\n\t\t";
                        foreach ($rs->f as $k => $v) {
                                if ($k == $localData->id && !isset($_REQUEST['oids'])) continue;
                                $finfo = $rs->fetchField($j++);
                                echo "<td>", $misc->printVal($v, true, $finfo->type), "</td>";
                        }
-                       echo "\n\t</tr>\n";
+                       echo "\r\n\t</tr>\r\n";
                        $rs->moveNext();
                }
-               echo "</table>\n";
-               echo "</body>\n";
-               echo "</html>\n";
+               echo "</table>\r\n";
+               echo "</body>\r\n";
+               echo "</html>\r\n";
        }
        elseif ($_REQUEST['format'] == 'sql') {
                $data->fieldClean($_REQUEST['table']);