nlopess Sat May 6 10:48:04 2006 UTC
Modified files:
/php-src/ext/tidy tidy.c
Log:
use the new zend_unicode_to_ascii() function. this should also fix windows
builds
http://cvs.php.net/viewcvs.cgi/php-src/ext/tidy/tidy.c?r1=1.82&r2=1.83&diff_format=u
Index: php-src/ext/tidy/tidy.c
diff -u php-src/ext/tidy/tidy.c:1.82 php-src/ext/tidy/tidy.c:1.83
--- php-src/ext/tidy/tidy.c:1.82 Tue Apr 25 14:54:33 2006
+++ php-src/ext/tidy/tidy.c Sat May 6 10:48:04 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tidy.c,v 1.82 2006/04/25 14:54:33 nlopess Exp $ */
+/* $Id: tidy.c,v 1.83 2006/05/06 10:48:04 nlopess Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -888,12 +888,8 @@
zval **opt_val;
ulong opt_indx;
uint opt_name_len;
- UConverter *conv = NULL;
- UErrorCode status = U_ZERO_ERROR;
zend_bool clear_str;
- zend_set_converter_encoding(&conv, "ASCII");
-
for (zend_hash_internal_pointer_reset(ht_options);
zend_hash_get_current_data(ht_options, (void **)&opt_val) ==
SUCCESS;
zend_hash_move_forward(ht_options)) {
@@ -904,10 +900,9 @@
break;
case HASH_KEY_IS_UNICODE:
- zend_convert_from_unicode(conv, &(opt_name.s),
&opt_name_len, opt_name.u, opt_name_len, &status);
- if (U_FAILURE(status)) {
+ opt_name.s = zend_unicode_to_ascii(opt_name.u,
opt_name_len);
+ if (!opt_name.s) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Could not convert key from the option array");
- ucnv_close(conv);
return FAILURE;
}
clear_str = 1;
@@ -918,7 +913,6 @@
default:
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not
retrieve key from option array");
- ucnv_close(conv);
return FAILURE;
}
@@ -928,7 +922,6 @@
}
}
- ucnv_close(conv);
return SUCCESS;
}
@@ -1005,7 +998,7 @@
php_info_print_table_start();
php_info_print_table_header(2, "Tidy support", "enabled");
php_info_print_table_row(2, "libTidy Release", (char
*)tidyReleaseDate());
- php_info_print_table_row(2, "Extension Version",
PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.82 2006/04/25 14:54:33 nlopess Exp
$)");
+ php_info_print_table_row(2, "Extension Version",
PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.83 2006/05/06 10:48:04 nlopess Exp
$)");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php