cvs: php-gtk /ext/gtk+ gtk.overrides

From: Date: Fri, 04 Jan 2002 00:55:15 +0000
Subject: cvs: php-gtk /ext/gtk+ gtk.overrides
Groups: php.gtk.cvs 
Request: Send a blank email to php-gtk-cvs+get-426@lists.php.net to get a copy of this message
fmk Thu Jan 3 19:55:15 2002 EDT Modified files: /php-gtk/ext/gtk+ gtk.overrides Log: More UTF-8 stuff. This time in ctree_insert_node and ctree_new_with_titles Index: php-gtk/ext/gtk+/gtk.overrides diff -u php-gtk/ext/gtk+/gtk.overrides:1.42 php-gtk/ext/gtk+/gtk.overrides:1.43 --- php-gtk/ext/gtk+/gtk.overrides:1.42 Thu Jan 3 19:45:49 2002 +++ php-gtk/ext/gtk+/gtk.overrides Thu Jan 3 19:55:15 2002 @@ -1114,6 +1114,9 @@ gchar **titles; zval *php_titles = NULL, **temp_title; HashTable *target_hash; +#ifdef PHP_WIN32 + gchar * utf8_text = NULL; +#endif NOT_STATIC_METHOD(); @@ -1141,7 +1144,12 @@ zend_hash_internal_pointer_reset(target_hash); while (zend_hash_get_current_data(target_hash, (void **)&temp_title) == SUCCESS) { convert_to_string_ex(temp_title); +#ifdef PHP_WIN32 + utf8_text = g_convert(Z_STRVAL_PP(temp_title), Z_STRLEN_PP(temp_title), "UTF-8", GTK_G(codepage), NULL, NULL, NULL); + titles[i++] = utf8_text; +#else titles[i++] = estrndup(Z_STRVAL_PP(temp_title), Z_STRLEN_PP(temp_title)); +#endif zend_hash_move_forward(target_hash); } wrapped_obj = (GtkObject *)gtk_ctree_new_with_titles(columns, tree_column, titles); @@ -1173,6 +1181,9 @@ GtkCTree *tree; gchar **text = NULL; HashTable *target_hash; +#ifdef PHP_WIN32 + gchar * utf8_text = NULL; +#endif NOT_STATIC_METHOD(); @@ -1210,7 +1221,12 @@ zend_hash_internal_pointer_reset(target_hash); while (zend_hash_get_current_data(target_hash, (void **)&temp_text) == SUCCESS) { convert_to_string_ex(temp_text); +#ifdef PHP_WIN32 + utf8_text = g_convert(Z_STRVAL_PP(temp_text), Z_STRLEN_PP(temp_text), "UTF-8", GTK_G(codepage), NULL, NULL, NULL); + text[i++] = utf8_text; +#else text[i++] = estrndup(Z_STRVAL_PP(temp_text), Z_STRLEN_PP(temp_text)); +#endif zend_hash_move_forward(target_hash); }

« previous php.gtk.cvs (#426) next »