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)) {
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;
default:
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not retrieve key from option array");
- ucnv_close(conv);
return FAILURE;
}
}
}
- ucnv_close(conv);
return SUCCESS;
}