- Tiny piece of unicode support

This commit is contained in:
Marcus Boerger 2006-07-23 06:05:23 +00:00
parent ea14497546
commit f55c2d0885

View file

@ -59,7 +59,8 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
(key_type = zend_hash_get_current_key_ex(ht, &key, &key_len, &idx, 0, NULL)) != HASH_KEY_NON_EXISTANT; (key_type = zend_hash_get_current_key_ex(ht, &key, &key_len, &idx, 0, NULL)) != HASH_KEY_NON_EXISTANT;
zend_hash_move_forward(ht) zend_hash_move_forward(ht)
) { ) {
if (key_type == HASH_KEY_IS_STRING && key_len && key.s[key_len-1] == '\0') { if ((key_type == HASH_KEY_IS_STRING || key_type == HASH_KEY_IS_UNICODE)
&& key_len && key.s[key_len-1] == '\0') {
/* We don't want that trailing NULL */ /* We don't want that trailing NULL */
key_len -= 1; key_len -= 1;
} }