cvs: php4 /ext/standard info.c
| From: | Marcus B�rger | Date: | Sun, 04 Aug 2002 22:49:48 +0000 |
| Subject: | cvs: php4 /ext/standard info.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-13124@lists.php.net to get a copy of this message | ||
helly Sun Aug 4 18:49:48 2002 EDT
Modified files:
/php4/ext/standard info.c
Log:
-Send charset US-ASCII or ini setting default_charset.
#After some discussion with Ilia Alshanetsky
#But perhaps we should have a look for a mbstring solution...
Index: php4/ext/standard/info.c
diff -u php4/ext/standard/info.c:1.186 php4/ext/standard/info.c:1.187
--- php4/ext/standard/info.c:1.186 Sun Aug 4 14:59:16 2002
+++ php4/ext/standard/info.c Sun Aug 4 18:49:48 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: info.c,v 1.186 2002/08/04 18:59:16 georg Exp $ */
+/* $Id: info.c,v 1.187 2002/08/04 22:49:48 helly Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -203,7 +203,7 @@
*/
PHPAPI void php_print_info(int flag TSRMLS_DC)
{
- char **env, *tmp1, *tmp2;
+ char **env, *tmp1, *tmp2, *charset = NULL;
char *php_uname;
int expose_php = INI_INT("expose_php");
time_t the_time;
@@ -216,7 +216,13 @@
PUTS("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01
Transitional//EN\">\n<html>\n");
PUTS("<head>");
php_info_print_style();
- PUTS("<title>phpinfo()</title><meta http-equiv=\"Content-Type\"
content=\"text/html; charset=ISO-8859-1\"></head><body>");
+ if (SG(default_charset)) {
+ charset = SG(default_charset);
+ }
+ if (!charset || !charset[0]) {
+ charset = "US-ASCII";
+ }
+ php_printf("<title>phpinfo()</title><meta
http-equiv=\"Content-Type\" content=\"text/html;
charset=%s\"></head><body>", charset);
if (flag & PHP_INFO_GENERAL) {
char *zend_version = get_zend_version();