cvs: php4 /ext/standard info.c

From: Date: Mon, 05 Aug 2002 19:00:11 +0000
Subject: cvs: php4 /ext/standard info.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13141@lists.php.net to get a copy of this message
helly Mon Aug 5 15:00:11 2002 EDT Modified files: /php4/ext/standard info.c Log: Correct carset if iconv is active #Same solution would work for mbstring - but that must wait Index: php4/ext/standard/info.c diff -u php4/ext/standard/info.c:1.187 php4/ext/standard/info.c:1.188 --- php4/ext/standard/info.c:1.187 Sun Aug 4 18:49:48 2002 +++ php4/ext/standard/info.c Mon Aug 5 15:00:09 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: info.c,v 1.187 2002/08/04 22:49:48 helly Exp $ */ +/* $Id: info.c,v 1.188 2002/08/05 19:00:09 helly Exp $ */ #include "php.h" #include "php_ini.h" @@ -38,6 +38,14 @@ #include <sys/utsname.h> #endif +#ifdef PHP_ATOM_INC +#include "php_have_iconv.h" +#endif +#if HAVE_ICONV +#include "ext/iconv/php_iconv.h" +ZEND_EXTERN_MODULE_GLOBALS(iconv) +#endif + #define SECTION(name) PUTS("<h2 align=\"center\">" name "</h2>\n") PHPAPI extern char *php_ini_opened_path; @@ -203,12 +211,13 @@ */ PHPAPI void php_print_info(int flag TSRMLS_DC) { - char **env, *tmp1, *tmp2, *charset = NULL; + char **env, *tmp1, *tmp2; + const char *charset = NULL; char *php_uname; int expose_php = INI_INT("expose_php"); time_t the_time; struct tm *ta, tmbuf; - + the_time = time(NULL); ta = php_localtime_r(&the_time, &tmbuf); @@ -219,6 +228,11 @@ if (SG(default_charset)) { charset = SG(default_charset); } +#if HAVE_ICONV + if (php_ob_handler_used("ob_iconv_handler" TSRMLS_CC)) { + charset = ICONVG(output_encoding); + } +#endif if (!charset || !charset[0]) { charset = "US-ASCII"; }

« previous php.cvs (#13141) next »