cvs: pearweb /include pear-format-html.php pear-prepend.php
| From: | Martin Jansen | Date: | Sat, 24 Apr 2004 08:30:52 +0000 |
| Subject: | cvs: pearweb /include pear-format-html.php pear-prepend.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-18673@lists.php.net to get a copy of this message | ||
mj Sat Apr 24 04:30:52 2004 EDT
Modified files:
/pearweb/include pear-format-html.php pear-prepend.php
Log:
* The Japanese and the Russian translations of the manual do not work
properly with ISO-8859-1 encoding.
http://cvs.php.net/diff.php/pearweb/include/pear-format-html.php?r1=1.89&r2=1.90&ty=u
Index: pearweb/include/pear-format-html.php
diff -u pearweb/include/pear-format-html.php:1.89 pearweb/include/pear-format-html.php:1.90
--- pearweb/include/pear-format-html.php:1.89 Fri Apr 23 12:41:13 2004
+++ pearweb/include/pear-format-html.php Sat Apr 24 04:30:50 2004
@@ -15,12 +15,9 @@
+----------------------------------------------------------------------+
| Authors: |
+----------------------------------------------------------------------+
- $Id: pear-format-html.php,v 1.89 2004/04/23 16:41:13 mj Exp $
+ $Id: pear-format-html.php,v 1.90 2004/04/24 08:30:50 mj Exp $
*/
-/* Send charset */
-header('Content-Type: text/html; charset=iso-8859-1');
-
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'error_handler');
require_once 'layout.php';
@@ -63,7 +60,7 @@
function response_header($title = 'The PHP Extension and Application Repository', $style
= false)
{
- global $_style, $_header_done, $SIDEBAR_DATA;
+ global $_style, $_header_done, $SIDEBAR_DATA, $encoding;
if ($_header_done) {
return;
}
@@ -93,7 +90,7 @@
}
}
-echo '<?xml version="1.0" encoding="iso-8859-1" ?>';
+echo '<?xml version="1.0" encoding="' . $encoding . '"
?>';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
http://cvs.php.net/diff.php/pearweb/include/pear-prepend.php?r1=1.46&r2=1.47&ty=u
Index: pearweb/include/pear-prepend.php
diff -u pearweb/include/pear-prepend.php:1.46 pearweb/include/pear-prepend.php:1.47
--- pearweb/include/pear-prepend.php:1.46 Thu Mar 25 12:55:44 2004
+++ pearweb/include/pear-prepend.php Sat Apr 24 04:30:50 2004
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Authors: |
+----------------------------------------------------------------------+
- $Id: pear-prepend.php,v 1.46 2004/03/25 17:55:44 mj Exp $
+ $Id: pear-prepend.php,v 1.47 2004/04/24 08:30:50 mj Exp $
*/
if ($_SERVER['SERVER_NAME'] != 'pear.php.net') {
@@ -34,8 +34,15 @@
require_once "pear-auth.php";
require_once "pear-database.php";
+$encoding = "iso-8559-1";
+
if (substr($_SERVER['PHP_SELF'], 0, 7) == '/manual') {
require_once "pear-manual.php";
+
+ // The Japanese and Russian manual translations neeed UTF-8 encodings
+ if (preg_match("=^/manual/(ja|ru)=", $_SERVER['PHP_SELF'])) {
+ $encoding = "utf-8";
+ }
}
if (empty($format)) {