tony2001                Tue Aug  8 16:59:12 2006 UTC

  Modified files:              
    /php-src/ext/dom    node.c 
    /php-src/ext/pdo    pdo_stmt.c 
    /php-src/ext/simplexml      simplexml.c 
    /php-src/ext/soap   php_encoding.c php_http.c soap.c 
    /php-src/ext/sqlite sqlite.c 
    /php-src/ext/standard       array.c streamsfuncs.c var.c 
    /php-src/ext/unicode        unicode.c 
    /php-src/main       output.c php_variables.c rfc1867.c spprintf.c 
    /php-src/main/streams       filter.c streams.c 
    /php-src/sapi/cli   php_cli_readline.c 
  Log:
  implement zend_unicode_to_string() and zend_string_to_unicode()
  part #2 (of 2)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/node.c?r1=1.48&r2=1.49&diff_format=u
Index: php-src/ext/dom/node.c
diff -u php-src/ext/dom/node.c:1.48 php-src/ext/dom/node.c:1.49
--- php-src/ext/dom/node.c:1.48 Mon Aug  7 20:22:33 2006
+++ php-src/ext/dom/node.c      Tue Aug  8 16:59:10 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: node.c,v 1.48 2006/08/07 20:22:33 tony2001 Exp $ */
+/* $Id: node.c,v 1.49 2006/08/08 16:59:10 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1785,7 +1785,7 @@
                                        UErrorCode errCode = 0;
 
                                        if (Z_TYPE_PP(tmpns) == IS_UNICODE) {
-                                               
zend_convert_from_unicode(UG(utf8_conv), &nschar, &nschar_len, 
Z_USTRVAL_PP(tmpns), Z_USTRLEN_PP(tmpns), &errCode);
+                                               
zend_unicode_to_string_ex(UG(utf8_conv), &nschar, &nschar_len, 
Z_USTRVAL_PP(tmpns), Z_USTRLEN_PP(tmpns), &errCode);
                                        } else {
                                                nschar = Z_STRVAL_PP(tmpns);
                                        }
@@ -1800,7 +1800,7 @@
                                                        int tmp_prefix_len;
                                                        errCode = 0;
 
-                                                       
zend_convert_from_unicode(UG(utf8_conv), &tmp_prefix, &tmp_prefix_len, 
prefix.u, prefix_key_len, &errCode);
+                                                       
zend_unicode_to_string_ex(UG(utf8_conv), &tmp_prefix, &tmp_prefix_len, 
prefix.u, prefix_key_len, &errCode);
                                                        
xmlXPathRegisterNs(ctxp, (xmlChar *)tmp_prefix, (xmlChar *)nschar);
                                                        efree(tmp_prefix);
                                                }
@@ -1815,7 +1815,7 @@
 
                if (Z_TYPE_PP(zxquery) == IS_UNICODE) {
                        UErrorCode errCode = 0;
-                       zend_convert_from_unicode(UG(utf8_conv), &xquery, 
&xquery_len, Z_USTRVAL_PP(zxquery), Z_USTRLEN_PP(zxquery), &errCode);
+                       zend_unicode_to_string_ex(UG(utf8_conv), &xquery, 
&xquery_len, Z_USTRVAL_PP(zxquery), Z_USTRLEN_PP(zxquery), &errCode);
                } else {
                        xquery = Z_STRVAL_PP(zxquery);
                }
@@ -1857,7 +1857,7 @@
                                        char *prefix;
                                        int prfeix_len;
 
-                                       
zend_convert_from_unicode(UG(utf8_conv), &prefix, &prfeix_len, 
Z_USTRVAL_PP(tmpns), Z_USTRLEN_PP(tmpns), &errCode);
+                                       
zend_unicode_to_string_ex(UG(utf8_conv), &prefix, &prfeix_len, 
Z_USTRVAL_PP(tmpns), Z_USTRLEN_PP(tmpns), &errCode);
                                        inclusive_ns_prefixes[nscount++] = 
prefix;
                                }
                                zend_hash_move_forward(Z_ARRVAL_P(ns_prefixes));
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.163&r2=1.164&diff_format=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.163 php-src/ext/pdo/pdo_stmt.c:1.164
--- php-src/ext/pdo/pdo_stmt.c:1.163    Tue Aug  1 15:06:12 2006
+++ php-src/ext/pdo/pdo_stmt.c  Tue Aug  8 16:59:10 2006
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_stmt.c,v 1.163 2006/08/01 15:06:12 iliaa Exp $ */
+/* $Id: pdo_stmt.c,v 1.164 2006/08/08 16:59:10 tony2001 Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -514,7 +514,7 @@
                                        UChar *u_str;
                                        int u_len;
                        
-                                       
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, 
&u_len, value, value_len, &status);
+                                       
zend_string_to_unicode_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, 
&u_len, value, value_len, &status);
                                        ZVAL_UNICODEL(dest, u_str, u_len, 0);
                                        if (caller_frees) {
                                                efree(value);
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.214&r2=1.215&diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.214 
php-src/ext/simplexml/simplexml.c:1.215
--- php-src/ext/simplexml/simplexml.c:1.214     Mon Aug  7 10:11:04 2006
+++ php-src/ext/simplexml/simplexml.c   Tue Aug  8 16:59:11 2006
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: simplexml.c,v 1.214 2006/08/07 10:11:04 rrichards Exp $ */
+/* $Id: simplexml.c,v 1.215 2006/08/08 16:59:11 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -2080,7 +2080,7 @@
                int u_len;
 
                namelen = xmlStrlen(curnode->name);
-               
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), 
&str_key->u, &u_len, (char*)curnode->name, namelen, &status);
+               
zend_string_to_unicode_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), 
&str_key->u, &u_len, (char*)curnode->name, namelen, &status);
                *str_key_len = u_len + 1;
                return HASH_KEY_IS_UNICODE;
        } else {
@@ -2271,7 +2271,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "Simplexml support", "enabled");
-       php_info_print_table_row(2, "Revision", "$Revision: 1.214 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.215 $");
        php_info_print_table_row(2, "Schema support",
 #ifdef LIBXML_SCHEMAS_ENABLED
                "enabled");
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.140&r2=1.141&diff_format=u
Index: php-src/ext/soap/php_encoding.c
diff -u php-src/ext/soap/php_encoding.c:1.140 
php-src/ext/soap/php_encoding.c:1.141
--- php-src/ext/soap/php_encoding.c:1.140       Tue Aug  1 16:10:25 2006
+++ php-src/ext/soap/php_encoding.c     Tue Aug  8 16:59:11 2006
@@ -17,7 +17,7 @@
   |          Dmitry Stogov <[EMAIL PROTECTED]>                             |
   +----------------------------------------------------------------------+
 */
-/* $Id: php_encoding.c,v 1.140 2006/08/01 16:10:25 dmitry Exp $ */
+/* $Id: php_encoding.c,v 1.141 2006/08/08 16:59:11 tony2001 Exp $ */
 
 #include <time.h>
 
@@ -3170,7 +3170,7 @@
 
                                ALLOC_INIT_ZVAL(tmp);
                                Z_TYPE_P(tmp) = IS_STRING;
-                               zend_convert_from_unicode(UG(utf8_conv), 
&Z_STRVAL_P(tmp), &Z_STRLEN_P(tmp), Z_USTRVAL_P(cur_stype), 
Z_USTRLEN_P(cur_stype), &status);
+                               zend_unicode_to_string_ex(UG(utf8_conv), 
&Z_STRVAL_P(tmp), &Z_STRLEN_P(tmp), Z_USTRVAL_P(cur_stype), 
Z_USTRLEN_P(cur_stype), &status);
                                cur_stype = tmp;
                        } else {
                                cur_stype->refcount++;
@@ -3183,7 +3183,7 @@
 
                                ALLOC_INIT_ZVAL(tmp);
                                Z_TYPE_P(tmp) = IS_STRING;
-                               zend_convert_from_unicode(UG(utf8_conv), 
&Z_STRVAL_P(tmp), &Z_STRLEN_P(tmp), Z_USTRVAL_P(cur_ns), Z_USTRLEN_P(cur_ns), 
&status);
+                               zend_unicode_to_string_ex(UG(utf8_conv), 
&Z_STRVAL_P(tmp), &Z_STRLEN_P(tmp), Z_USTRVAL_P(cur_ns), Z_USTRLEN_P(cur_ns), 
&status);
                                cur_ns = tmp;
                        } else {
                                cur_ns->refcount++;
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.95&r2=1.96&diff_format=u
Index: php-src/ext/soap/php_http.c
diff -u php-src/ext/soap/php_http.c:1.95 php-src/ext/soap/php_http.c:1.96
--- php-src/ext/soap/php_http.c:1.95    Tue Aug  1 16:10:25 2006
+++ php-src/ext/soap/php_http.c Tue Aug  8 16:59:11 2006
@@ -17,7 +17,7 @@
   |          Dmitry Stogov <[EMAIL PROTECTED]>                             |
   +----------------------------------------------------------------------+
 */
-/* $Id: php_http.c,v 1.95 2006/08/01 16:10:25 dmitry Exp $ */
+/* $Id: php_http.c,v 1.96 2006/08/08 16:59:11 tony2001 Exp $ */
 
 #include "php_soap.h"
 #include "ext/standard/base64.h"
@@ -632,7 +632,7 @@
                                                                        char 
*res;
                                                                        int 
res_len;
 
-                                                                       
zend_convert_from_unicode(UG(utf8_conv), &res, &res_len, key.u, key_len-1, 
&status);
+                                                                       
zend_unicode_to_string_ex(UG(utf8_conv), &res, &res_len, key.u, key_len-1, 
&status);
                                                                        
smart_str_appendl(&soap_headers, res, res_len);
                                                                        
efree(res);
                                                                }
@@ -644,7 +644,7 @@
                                                                        char 
*res;
                                                                        int 
res_len;
 
-                                                                       
zend_convert_from_unicode(UG(utf8_conv), &res, &res_len, Z_USTRVAL_PP(value), 
Z_USTRLEN_PP(value), &status);
+                                                                       
zend_unicode_to_string_ex(UG(utf8_conv), &res, &res_len, Z_USTRVAL_PP(value), 
Z_USTRLEN_PP(value), &status);
                                                                        
smart_str_appendl(&soap_headers, res, res_len);
                                                                        
efree(res);
                                                                }
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/soap.c?r1=1.203&r2=1.204&diff_format=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.203 php-src/ext/soap/soap.c:1.204
--- php-src/ext/soap/soap.c:1.203       Fri Aug  4 13:40:12 2006
+++ php-src/ext/soap/soap.c     Tue Aug  8 16:59:11 2006
@@ -17,7 +17,7 @@
   |          Dmitry Stogov <[EMAIL PROTECTED]>                             |
   +----------------------------------------------------------------------+
 */
-/* $Id: soap.c,v 1.203 2006/08/04 13:40:12 rrichards Exp $ */
+/* $Id: soap.c,v 1.204 2006/08/08 16:59:11 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -308,7 +308,7 @@
        char *tmp;
        int tmp_len;
 
-       zend_convert_from_unicode(UG(utf8_conv), &tmp, &tmp_len, ustr, 
ustr_len, &errCode);
+       zend_unicode_to_string_ex(UG(utf8_conv), &tmp, &tmp_len, ustr, 
ustr_len, &errCode);
        return tmp;
 }
 
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite/sqlite.c?r1=1.194&r2=1.195&diff_format=u
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.194 php-src/ext/sqlite/sqlite.c:1.195
--- php-src/ext/sqlite/sqlite.c:1.194   Wed Jun 14 16:04:47 2006
+++ php-src/ext/sqlite/sqlite.c Tue Aug  8 16:59:11 2006
@@ -17,7 +17,7 @@
    |          Marcus Boerger <[EMAIL PROTECTED]>                              |
    +----------------------------------------------------------------------+
 
-   $Id: sqlite.c,v 1.194 2006/06/14 16:04:47 iliaa Exp $
+   $Id: sqlite.c,v 1.195 2006/08/08 16:59:11 tony2001 Exp $
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1129,7 +1129,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "SQLite support", "enabled");
-       php_info_print_table_row(2, "PECL Module version", 
PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.194 2006/06/14 16:04:47 iliaa Exp 
$");
+       php_info_print_table_row(2, "PECL Module version", 
PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.195 2006/08/08 16:59:11 tony2001 
Exp $");
        php_info_print_table_row(2, "SQLite Library", sqlite_libversion());
        php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding());
        php_info_print_table_end();
@@ -1689,7 +1689,7 @@
                        UChar *u_str;
                        int u_len;
 
-                       
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, 
&u_len, tmp, strlen(tmp), &status);
+                       
zend_string_to_unicode_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, 
&u_len, tmp, strlen(tmp), &status);
                        if (result_type == PHPSQLITE_ASSOC) {
                                add_assoc_unicode(return_value, colname, u_str, 
1);
                        }
@@ -1857,7 +1857,7 @@
                                UChar *u_str;
                                int u_len;
 
-                               
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, 
&u_len, (char*)rowdata[j], strlen((char*)rowdata[j]), &status);
+                               
zend_string_to_unicode_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, 
&u_len, (char*)rowdata[j], strlen((char*)rowdata[j]), &status);
                                ZVAL_UNICODEL(decoded, u_str, u_len, 0);
                                if (!buffered) {
                                        efree((char *)rowdata[j]);
@@ -1945,7 +1945,7 @@
                UChar *u_str;
                int u_len;
 
-               
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, 
&u_len, (char*)rowdata[j], strlen((char*)rowdata[j]), &status);
+               
zend_string_to_unicode_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, 
&u_len, (char*)rowdata[j], strlen((char*)rowdata[j]), &status);
                RETVAL_UNICODEL(u_str, u_len, 0);
                if (!res->buffered) {
                        efree((char *)rowdata[j]);
@@ -2277,7 +2277,7 @@
                UChar *u_str;
                int u_len;
 
-               
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, 
&u_len, decoded, decoded_len, &status);
+               
zend_string_to_unicode_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, 
&u_len, decoded, decoded_len, &status);
                if (free_decoded) {
                        efree(decoded);
                }
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.380&r2=1.381&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.380 php-src/ext/standard/array.c:1.381
--- php-src/ext/standard/array.c:1.380  Thu Aug  3 23:09:29 2006
+++ php-src/ext/standard/array.c        Tue Aug  8 16:59:11 2006
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: array.c,v 1.380 2006/08/03 23:09:29 andrei Exp $ */
+/* $Id: array.c,v 1.381 2006/08/08 16:59:11 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -1277,7 +1277,7 @@
                        int buf_len;
                        UErrorCode status = U_ZERO_ERROR;
 
-                       
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)),
+                       
zend_string_to_unicode_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)),
                                                                        &buf, 
&buf_len, var_name.s, var_name_len, &status);
                        if (U_FAILURE(status)) {
                                zval_dtor(result);
@@ -1304,7 +1304,7 @@
                        int buf_len;
                        UErrorCode status = U_ZERO_ERROR;
 
-                       
zend_convert_from_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)),
+                       
zend_unicode_to_string_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)),
                                                                          &buf, 
&buf_len, var_name.u, var_name_len, &status);
                        if (U_FAILURE(status)) {
                                zval_dtor(result);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.81&r2=1.82&diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.81 
php-src/ext/standard/streamsfuncs.c:1.82
--- php-src/ext/standard/streamsfuncs.c:1.81    Fri Jul 14 20:45:37 2006
+++ php-src/ext/standard/streamsfuncs.c Tue Aug  8 16:59:11 2006
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: streamsfuncs.c,v 1.81 2006/07/14 20:45:37 tony2001 Exp $ */
+/* $Id: streamsfuncs.c,v 1.82 2006/08/08 16:59:11 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -870,7 +870,7 @@
                                char *tmp;
                                int tmp_len;
 
-                               
zend_convert_from_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &tmp, 
&tmp_len, wkey.u, wkey_len, &errCode);
+                               
zend_unicode_to_string_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &tmp, 
&tmp_len, wkey.u, wkey_len, &errCode);
                                wkey.s = tmp;
                                wkey_len = tmp_len;
                        }
@@ -884,7 +884,7 @@
                                        char *tmp;
                                        int tmp_len;
        
-                                       
zend_convert_from_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &tmp, 
&tmp_len, okey.u, okey_len, &errCode);
+                                       
zend_unicode_to_string_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &tmp, 
&tmp_len, okey.u, okey_len, &errCode);
                                        okey.s = tmp;
                                        okey_len = tmp_len;
                                        php_stream_context_set_option(context, 
wkey.s, okey.s, *oval);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var.c?r1=1.243&r2=1.244&diff_format=u
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.243 php-src/ext/standard/var.c:1.244
--- php-src/ext/standard/var.c:1.243    Tue Jul 25 16:40:11 2006
+++ php-src/ext/standard/var.c  Tue Aug  8 16:59:11 2006
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: var.c,v 1.243 2006/07/25 16:40:11 bjori Exp $ */
+/* $Id: var.c,v 1.244 2006/08/08 16:59:11 tony2001 Exp $ */
 
 
 
@@ -56,7 +56,7 @@
                return;
        }
 
-       zend_convert_from_unicode(ZEND_U_CONVERTER(UG(output_encoding_conv)), 
&out, &clen, ustr, length, &status);
+       zend_unicode_to_string_ex(ZEND_U_CONVERTER(UG(output_encoding_conv)), 
&out, &clen, ustr, length, &status);
        if(U_FAILURE(status)) {
                php_printf("problem converting string from Unicode: %s\n", 
u_errorName(status));
                efree(out);
http://cvs.php.net/viewvc.cgi/php-src/ext/unicode/unicode.c?r1=1.39&r2=1.40&diff_format=u
Index: php-src/ext/unicode/unicode.c
diff -u php-src/ext/unicode/unicode.c:1.39 php-src/ext/unicode/unicode.c:1.40
--- php-src/ext/unicode/unicode.c:1.39  Wed Jun 28 14:12:14 2006
+++ php-src/ext/unicode/unicode.c       Tue Aug  8 16:59:11 2006
@@ -15,7 +15,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: unicode.c,v 1.39 2006/06/28 14:12:14 andrei Exp $ */ 
+/* $Id: unicode.c,v 1.40 2006/08/08 16:59:11 tony2001 Exp $ */ 
 
 #include "php_unicode.h"
 #include "zend_unicode.h"
@@ -60,7 +60,7 @@
        zend_set_converter_error_mode(conv, ZEND_TO_UNICODE, flags);
 
        status = U_ZERO_ERROR;
-       num_conv = zend_convert_to_unicode(conv, &dest, &dest_len, str, 
str_len, &status);
+       num_conv = zend_string_to_unicode_ex(conv, &dest, &dest_len, str, 
str_len, &status);
        if (U_FAILURE(status)) {
                zend_raise_conversion_error_ex("could not decode binary 
string", conv, ZEND_TO_UNICODE, num_conv TSRMLS_CC);
                efree(dest);
@@ -111,7 +111,7 @@
        zend_set_converter_subst_char(conv, UG(from_subst_char));
 
        status = U_ZERO_ERROR;
-       num_conv = zend_convert_from_unicode(conv, &dest, &dest_len, uni, 
uni_len, &status);
+       num_conv = zend_unicode_to_string_ex(conv, &dest, &dest_len, uni, 
uni_len, &status);
        if (U_FAILURE(status)) {
                int32_t offset = u_countChar32(uni, num_conv);
                zend_raise_conversion_error_ex("could not encode Unicode 
string", conv, ZEND_FROM_UNICODE, offset TSRMLS_CC);
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.183&r2=1.184&diff_format=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.183 php-src/main/output.c:1.184
--- php-src/main/output.c:1.183 Mon Jun 12 18:18:39 2006
+++ php-src/main/output.c       Tue Aug  8 16:59:11 2006
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: output.c,v 1.183 2006/06/12 18:18:39 mike Exp $ */
+/* $Id: output.c,v 1.184 2006/08/08 16:59:11 tony2001 Exp $ */
 
 #ifndef PHP_OUTPUT_DEBUG
 #      define PHP_OUTPUT_DEBUG 0
@@ -243,7 +243,7 @@
                return 0;
        }
        
-       zend_convert_from_unicode(UG(output_encoding_conv), &buf_str, &buf_len, 
str, len, &status);
+       zend_unicode_to_string_ex(UG(output_encoding_conv), &buf_str, &buf_len, 
str, len, &status);
        if (U_ZERO_ERROR == status) {
                php_output_op(PHP_OUTPUT_HANDLER_WRITE, buf_str, buf_len 
TSRMLS_CC);
        }
http://cvs.php.net/viewvc.cgi/php-src/main/php_variables.c?r1=1.128&r2=1.129&diff_format=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.128 php-src/main/php_variables.c:1.129
--- php-src/main/php_variables.c:1.128  Thu Jul 27 17:14:24 2006
+++ php-src/main/php_variables.c        Tue Aug  8 16:59:11 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_variables.c,v 1.128 2006/07/27 17:14:24 iliaa Exp $ */
+/* $Id: php_variables.c,v 1.129 2006/08/08 16:59:11 tony2001 Exp $ */
 
 #include <stdio.h>
 #include "php.h"
@@ -372,8 +372,8 @@
                                php_url_decode(var, var_len);
                                val++;
                                val_len = php_url_decode(val, (p - val));
-                               zend_convert_to_unicode(input_conv, &u_var, 
&u_var_len, var, var_len, &status1);
-                               zend_convert_to_unicode(input_conv, &u_val, 
&u_val_len, val, val_len, &status2);
+                               zend_string_to_unicode_ex(input_conv, &u_var, 
&u_var_len, var, var_len, &status1);
+                               zend_string_to_unicode_ex(input_conv, &u_val, 
&u_val_len, val, val_len, &status2);
                                if (U_SUCCESS(status1) && U_SUCCESS(status2)) {
                                        /* UTODO add input filtering */
                                        php_u_register_variable_safe(u_var, 
u_val, u_val_len, array_ptr TSRMLS_CC);
@@ -515,7 +515,7 @@
                        int u_var_len, u_val_len;
                        UErrorCode status = U_ZERO_ERROR;
 
-                       zend_convert_to_unicode(input_conv, &u_var, &u_var_len, 
var, var_len, &status);
+                       zend_string_to_unicode_ex(input_conv, &u_var, 
&u_var_len, var, var_len, &status);
                        if (U_FAILURE(status)) {
                                /* UTODO set a user-accessible flag to indicate 
that conversion failed? */
                                efree(u_var);
@@ -527,7 +527,7 @@
                                unsigned int new_val_len;
 
                                val_len = php_url_decode(val, strlen(val));
-                               zend_convert_to_unicode(input_conv, &u_val, 
&u_val_len, val, val_len, &status);
+                               zend_string_to_unicode_ex(input_conv, &u_val, 
&u_val_len, val, val_len, &status);
                                if (U_FAILURE(status)) {
                                        /* UTODO set a user-accessible flag to 
indicate that conversion failed? */
                                        efree(u_var);
http://cvs.php.net/viewvc.cgi/php-src/main/rfc1867.c?r1=1.187&r2=1.188&diff_format=u
Index: php-src/main/rfc1867.c
diff -u php-src/main/rfc1867.c:1.187 php-src/main/rfc1867.c:1.188
--- php-src/main/rfc1867.c:1.187        Thu Jul 27 17:14:24 2006
+++ php-src/main/rfc1867.c      Tue Aug  8 16:59:11 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: rfc1867.c,v 1.187 2006/07/27 17:14:24 iliaa Exp $ */
+/* $Id: rfc1867.c,v 1.188 2006/08/08 16:59:11 tony2001 Exp $ */
 
 /*
  *  This product includes software developed by the Apache Group
@@ -365,7 +365,7 @@
        }
 
        input_conv = ZEND_U_CONVERTER(UG(output_encoding_conv));
-       zend_convert_to_unicode(input_conv, &buf, &buf_len, in, in_len, 
&status);
+       zend_string_to_unicode_ex(input_conv, &buf, &buf_len, in, in_len, 
&status);
        if (U_SUCCESS(status)) {
                if (out_len)
                        *out_len = buf_len;
@@ -1151,7 +1151,7 @@
 
                                if (value) {
                                        /* UTODO use 'charset' parameter for 
conversion */
-                                       zend_convert_to_unicode(input_conv, 
&u_val, &u_val_len, value, value_len, &status);
+                                       zend_string_to_unicode_ex(input_conv, 
&u_val, &u_val_len, value, value_len, &status);
                                        if (U_FAILURE(status)) {
                                                /* UTODO set a user-accessible 
flag to indicate that conversion failed? */
                                                goto var_done;
http://cvs.php.net/viewvc.cgi/php-src/main/spprintf.c?r1=1.36&r2=1.37&diff_format=u
Index: php-src/main/spprintf.c
diff -u php-src/main/spprintf.c:1.36 php-src/main/spprintf.c:1.37
--- php-src/main/spprintf.c:1.36        Thu Mar  2 13:12:45 2006
+++ php-src/main/spprintf.c     Tue Aug  8 16:59:11 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: spprintf.c,v 1.36 2006/03/02 13:12:45 dmitry Exp $ */
+/* $Id: spprintf.c,v 1.37 2006/08/08 16:59:11 tony2001 Exp $ */
 
 /* This is the spprintf implementation.
  * It has emerged from apache snprintf. See original header:
@@ -589,7 +589,7 @@
                                                s = (char*)u;
                                                s_unicode = 1;
                                        } else {
-                                               zend_convert_from_unicode(conv, 
&res, &s_len, u, u_len, &status);
+                                               zend_unicode_to_string_ex(conv, 
&res, &s_len, u, u_len, &status);
                                                if (U_FAILURE(status)) {
                                                        php_error(E_WARNING, 
"Could not convert Unicode to printable form in s[np]printf call");
                                                        return;
http://cvs.php.net/viewvc.cgi/php-src/main/streams/filter.c?r1=1.33&r2=1.34&diff_format=u
Index: php-src/main/streams/filter.c
diff -u php-src/main/streams/filter.c:1.33 php-src/main/streams/filter.c:1.34
--- php-src/main/streams/filter.c:1.33  Wed Jun 21 20:17:21 2006
+++ php-src/main/streams/filter.c       Tue Aug  8 16:59:11 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: filter.c,v 1.33 2006/06/21 20:17:21 andrei Exp $ */
+/* $Id: filter.c,v 1.34 2006/08/08 16:59:11 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -727,13 +727,13 @@
                        UChar *dest;
                        int destlen;
 
-                       zend_convert_to_unicode(conv, &dest, &destlen, 
bucket->buf.s, bucket->buflen, &status);
+                       zend_string_to_unicode_ex(conv, &dest, &destlen, 
bucket->buf.s, bucket->buflen, &status);
 
                        if (bucket->own_buf) {
                                pefree(bucket->buf.s, bucket->is_persistent);
                        }
 
-                       /* Might be dangerous, double check this (or, better, 
get a persistent version of zend_convert_to_unicode() */
+                       /* Might be dangerous, double check this (or, better, 
get a persistent version of zend_string_to_unicode_ex() */
                        bucket->is_persistent = 0;
 
                        bucket->buf_type = IS_UNICODE;
@@ -746,7 +746,7 @@
                        char *dest;
                        int destlen, num_conv;
 
-                       num_conv = zend_convert_from_unicode(conv, &dest, 
&destlen, bucket->buf.u, bucket->buflen, &status);
+                       num_conv = zend_unicode_to_string_ex(conv, &dest, 
&destlen, bucket->buf.u, bucket->buflen, &status);
                        if (U_FAILURE(status)) {
                                int32_t offset = u_countChar32(bucket->buf.u, 
num_conv);
 
http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.129&r2=1.130&diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.129 
php-src/main/streams/streams.c:1.130
--- php-src/main/streams/streams.c:1.129        Fri Jul 14 19:14:40 2006
+++ php-src/main/streams/streams.c      Tue Aug  8 16:59:11 2006
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: streams.c,v 1.129 2006/07/14 19:14:40 pollita Exp $ */
+/* $Id: streams.c,v 1.130 2006/08/08 16:59:11 tony2001 Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -1219,7 +1219,7 @@
                UErrorCode status = U_ZERO_ERROR;
 
                /* Use runtime_encoding to map to binary */
-               num_conv = 
zend_convert_from_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &str, 
&len, buf.u, buflen, &status);
+               num_conv = 
zend_unicode_to_string_ex(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &str, 
&len, buf.u, buflen, &status);
                if (U_FAILURE(status)) {
                        zend_raise_conversion_error_ex("Unable to convert data 
to be written", ZEND_U_CONVERTER(UG(runtime_encoding_conv)),
                                                                        
ZEND_FROM_UNICODE, num_conv TSRMLS_CC);
@@ -2587,7 +2587,7 @@
                        int scheme_len = 0;
 
                        /* Convert just the scheme using utf8 in order to look 
it up in the registry */
-                       num_conv = zend_convert_from_unicode(UG(utf8_conv), 
&scheme, &scheme_len, path, (p - path) + delim_len, &status);
+                       num_conv = zend_unicode_to_string_ex(UG(utf8_conv), 
&scheme, &scheme_len, path, (p - path) + delim_len, &status);
                        if (U_FAILURE(status)) {
                                if (options & REPORT_ERRORS) {
                                        zend_raise_conversion_error_ex("Unable 
to convert filepath", UG(utf8_conv), ZEND_FROM_UNICODE, num_conv TSRMLS_CC);
@@ -2624,7 +2624,7 @@
        /* Otherwise, fallback on filesystem_encoding */
        status = U_ZERO_ERROR;
 
-       num_conv = 
zend_convert_from_unicode(ZEND_U_CONVERTER(UG(filesystem_encoding_conv)),
+       num_conv = 
zend_unicode_to_string_ex(ZEND_U_CONVERTER(UG(filesystem_encoding_conv)),
                                pathenc, pathenc_len, path, path_len, &status);
        if (U_FAILURE(status)) {
                if (options & REPORT_ERRORS) {
@@ -2666,7 +2666,7 @@
        }
 
        /* Otherwise fallback on filesystem_encoding */
-       num_conv = 
zend_convert_to_unicode(ZEND_U_CONVERTER(UG(filesystem_encoding_conv)),
+       num_conv = 
zend_string_to_unicode_ex(ZEND_U_CONVERTER(UG(filesystem_encoding_conv)),
                                pathdec, pathdec_len, path, path_len, &status);
        if (U_FAILURE(status)) {
                if (options & REPORT_ERRORS) {
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli_readline.c?r1=1.10&r2=1.11&diff_format=u
Index: php-src/sapi/cli/php_cli_readline.c
diff -u php-src/sapi/cli/php_cli_readline.c:1.10 
php-src/sapi/cli/php_cli_readline.c:1.11
--- php-src/sapi/cli/php_cli_readline.c:1.10    Wed Mar  1 16:27:47 2006
+++ php-src/sapi/cli/php_cli_readline.c Tue Aug  8 16:59:11 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_cli_readline.c,v 1.10 2006/03/01 16:27:47 dmitry Exp $ */
+/* $Id: php_cli_readline.c,v 1.11 2006/08/08 16:59:11 tony2001 Exp $ */
 
 #include "php.h"
 
@@ -312,7 +312,7 @@
                        UErrorCode status = U_ZERO_ERROR;
 
                        len = u_strlen((UChar *)retval);
-                       
zend_convert_from_unicode(ZEND_U_CONVERTER(UG(output_encoding_conv)), &tmp, 
&tmp_len, 
+                       
zend_unicode_to_string_ex(ZEND_U_CONVERTER(UG(output_encoding_conv)), &tmp, 
&tmp_len, 
                                                                          
(UChar *)retval, len, &status);
 
                        retval = malloc(tmp_len + 2);
@@ -345,7 +345,7 @@
                        UErrorCode status = U_ZERO_ERROR;
 
                        len = u_strlen((UChar *)func->common.function_name.u);
-                       
zend_convert_from_unicode(ZEND_U_CONVERTER(UG(output_encoding_conv)), &tmp, 
&tmp_len,
+                       
zend_unicode_to_string_ex(ZEND_U_CONVERTER(UG(output_encoding_conv)), &tmp, 
&tmp_len,
                                                                          
(UChar *)func->common.function_name.u, len, &status);
 
                        retval = strdup(tmp);
@@ -371,7 +371,7 @@
                        UErrorCode status = U_ZERO_ERROR;
 
                        len = u_strlen((UChar *)(*pce)->name.u);
-                       
zend_convert_from_unicode(ZEND_U_CONVERTER(UG(output_encoding_conv)), &tmp, 
&tmp_len, 
+                       
zend_unicode_to_string_ex(ZEND_U_CONVERTER(UG(output_encoding_conv)), &tmp, 
&tmp_len, 
                                                                          
(UChar *)(*pce)->name.u, len, &status);
 
                        retval = strdup(tmp);
@@ -397,7 +397,7 @@
                        UErrorCode status = U_ZERO_ERROR;
 
                        len = u_strlen((UChar *)retval);
-                       
zend_convert_from_unicode(ZEND_U_CONVERTER(UG(output_encoding_conv)), &tmp, 
&tmp_len, 
+                       
zend_unicode_to_string_ex(ZEND_U_CONVERTER(UG(output_encoding_conv)), &tmp, 
&tmp_len, 
                                                                          
(UChar *)retval, len, &status);
 
                        retval = strdup(tmp);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to