#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;
*/
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);
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";
}