]> granicus.if.org Git - php/commitdiff
- utf8 CREDITS and php_info API
authorMichael Wallner <mike@php.net>
Tue, 12 Dec 2006 19:25:47 +0000 (19:25 +0000)
committerMichael Wallner <mike@php.net>
Tue, 12 Dec 2006 19:25:47 +0000 (19:25 +0000)
- unicode progress in info.c

ext/posix/CREDITS
ext/standard/credits.c
ext/standard/credits_ext.h
ext/standard/info.c
ext/standard/info.h
unicode-progress.txt

index c769635d91b1b9fbfcd4e8462ec83921138be345..b7d4e0cd5d0545fd8147b1a4bf8232138839769c 100644 (file)
@@ -1,2 +1,2 @@
 Posix
-Kristian Köhntopp
+Kristian Köhntopp
index 8906d3595adca3256ce8ba38b9432acff184da64..92808b256835bf82973496c88138fbeff0100851 100644 (file)
 #include "info.h"
 #include "SAPI.h"
 
+/* NOTE: keep utf8 */
+
 #define CREDIT_LINE(module, authors) php_info_print_table_row(2, module, authors)
-#define CREDIT_PUTS(s) php_output_write_western((s), strlen(s) TSRMLS_CC)
+#define CREDIT_PUTS(s) php_output_write_utf8((s), strlen(s) TSRMLS_CC)
 
 /* {{{ php_print_credits
  */
index 97fd3597f05d1b8bf8a15b16ff34d4241d27361e..f8c50090aeb3939a73050d93f39dd5c36d0d9a45 100644 (file)
@@ -57,7 +57,7 @@ CREDIT_LINE("pcntl", "Jason Greene");
 CREDIT_LINE("Perl Compatible Regexps", "Andrei Zmievski");
 CREDIT_LINE("PHP Data Objects", "Wez Furlong, Marcus Boerger, Sterling Hughes, George Schlossnagle, Ilia Alshanetsky");
 CREDIT_LINE("PHP hash", "Sara Golemon, Rasmus Lerdorf, Stefan Esser, Michael Wallner");
-CREDIT_LINE("Posix", "Kristian Köhntopp");
+CREDIT_LINE("Posix", "Kristian Köhntopp");
 CREDIT_LINE("PostgreSQL driver for PDO", "Edin Kadribasic, Ilia Alshanetsky");
 CREDIT_LINE("PostgreSQL", "Jouni Ahto, Zeev Suraski, Yasuo Ohgaki, Chris Kings-Lynne");
 CREDIT_LINE("Pspell", "Vlad Krupin");
index 0255e97904496988279151f22db410546c1f84bb..3b77e25571907edded55c7e072b69ccc036d81f4 100644 (file)
@@ -67,8 +67,8 @@ static int php_info_print_html_esc(const char *str, int len)
        char *new_str;
        TSRMLS_FETCH();
        
-       new_str = php_escape_html_entities((char *) str, len, &new_len, 0, ENT_QUOTES, "iso-8859-1" TSRMLS_CC);
-       written = php_output_write_western(new_str, new_len TSRMLS_CC);
+       new_str = php_escape_html_entities((char *) str, len, &new_len, 0, ENT_QUOTES, "utf8" TSRMLS_CC);
+       written = php_output_write_utf8(new_str, new_len TSRMLS_CC);
        efree(new_str);
        return written;
 }
@@ -76,17 +76,15 @@ static int php_info_print_html_esc(const char *str, int len)
 static int php_info_uprint_html_esc(const UChar *str, int len)
 {
        UErrorCode status = U_ZERO_ERROR;
-       char *new_str = NULL, *esc_str;
-       int new_len, esc_len, written;
+       char *new_str = NULL;
+       int new_len, written;
        TSRMLS_FETCH();
        
        zend_unicode_to_string_ex(UG(utf8_conv), &new_str, &new_len, str, len, &status);
        if (U_FAILURE(status)) {
                return 0;
        }
-       
-       esc_str = php_escape_html_entities(new_str, new_len, &esc_len, 0, ENT_QUOTES, "utf8" TSRMLS_CC);
-       written = php_output_write_utf8(esc_str, esc_len TSRMLS_CC);
+       written = php_info_print_html_esc(new_str, new_len);
        efree(new_str);
        return written;
 }
@@ -102,7 +100,7 @@ static int php_info_printf(const char *fmt, ...)
        len = vspprintf(&buf, 0, fmt, argv);
        va_end(argv);
        
-       written = php_output_write_western(buf, len TSRMLS_CC);
+       written = php_output_write_utf8(buf, len TSRMLS_CC);
        efree(buf);
        return written;
 }
@@ -118,7 +116,7 @@ static void php_info_print_request_uri(TSRMLS_D)
 static int php_info_print(const char *str)
 {
        TSRMLS_FETCH();
-       return php_output_write_western(str, strlen(str) TSRMLS_CC);
+       return php_output_write_utf8(str, strlen(str) TSRMLS_CC);
 }
 
 static int php_info_uprint(const UChar *str, int len)
index 6be71cfe5b5abb7a0f06599e642ec7f99ea71af5..ab89cc3a79cedc642dfc795bdb473db12bedd1db 100644 (file)
@@ -66,6 +66,7 @@ PHP_FUNCTION(php_egg_logo_guid);
 PHP_FUNCTION(php_sapi_name);
 PHP_FUNCTION(php_uname);
 PHP_FUNCTION(php_ini_scanned_files);
+/* NOTE: use UTF-8 if you print anything non-ASCII */
 PHPAPI char *php_info_html_esc(char *string TSRMLS_DC);
 PHPAPI void php_print_info_htmlhead(TSRMLS_D);
 PHPAPI void php_print_info(int flag TSRMLS_DC);
index 7229efa8166d0bc7bec676ccd69102610777b55b..5ccaa5c07e9911e5e4f4113e1fa8b476987a94c2 100644 (file)
@@ -568,6 +568,18 @@ ext/standard
     array_intersect_uassoc(), array_uintersect_uassoc()
     array_intersect_key(), array_intersect_ukey()
 
+  info.c
+  ------
+    phpinfo()
+    phpversion()
+    phpcredits()
+    php_logo_guid()
+    php_real_logo_guid()
+    php_egg_logo_guid()
+    zend_logo_guid()
+    php_sapi_name()
+    php_uname()
+    php_ini_scanned_files()
 
   string.c
   --------