summaryrefslogtreecommitdiff
path: root/ext/standard
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2002-08-04 22:49:48 +0000
committerMarcus Boerger <helly@php.net>2002-08-04 22:49:48 +0000
commitfa175d6fa210c7c0e3000aff0253b1ab0e18c70b (patch)
tree744cf446aacc6d658f74e2ea494f4b48a00d43e7 /ext/standard
parented4267cf342b50871578398e19b96fb144c382c0 (diff)
downloadphp-git-fa175d6fa210c7c0e3000aff0253b1ab0e18c70b.tar.gz
-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...
Diffstat (limited to 'ext/standard')
-rw-r--r--ext/standard/info.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 5d90afc43e..ee22c9c958 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -203,7 +203,7 @@ PHPAPI char *php_get_uname(char mode)
*/
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 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
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();