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

From: Date: Fri, 04 Jan 2002 17:45:23 +0000
Subject: cvs: php-gtk /ext/gtk+ gtk.overrides
Groups: php.gtk.cvs 
Request: Send a blank email to php-gtk-cvs+get-428@lists.php.net to get a copy of this message
fmk Fri Jan 4 12:45:23 2002 EDT Modified files: /php-gtk/ext/gtk+ gtk.overrides Log: Fixing codepage convertion for returned strings Index: php-gtk/ext/gtk+/gtk.overrides diff -u php-gtk/ext/gtk+/gtk.overrides:1.43 php-gtk/ext/gtk+/gtk.overrides:1.44 --- php-gtk/ext/gtk+/gtk.overrides:1.43 Thu Jan 3 19:55:15 2002 +++ php-gtk/ext/gtk+/gtk.overrides Fri Jan 4 12:45:23 2002 @@ -818,7 +818,10 @@ PHP_FUNCTION(gtk_clist_get_text) { gint row, column; - gchar *text; + gchar *text = NULL; +#ifdef PHP_WIN32 + gchar *cp_text = NULL; +#endif if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ii", &row, &column)) return; @@ -828,7 +831,12 @@ return; } +#ifdef PHP_WIN32 + cp_text = g_convert(text, strlen(text), GTK_G(codepage), "UTF-8", NULL, NULL, NULL); + RETURN_STRING(cp_text, 0); +#else RETURN_STRING(text, 1); +#endif } %% override gtk_clist_get_pixmap @@ -1432,6 +1440,9 @@ zval *node; gint column; gchar *text = NULL; +#ifdef PHP_WIN32 + gchar *cp_text = NULL; +#endif NOT_STATIC_METHOD(); @@ -1444,7 +1455,12 @@ return; } +#ifdef PHP_WIN32 + cp_text = g_convert(text, strlen(text), GTK_G(codepage), "UTF-8", NULL, NULL, NULL); + RETURN_STRING(cp_text, 0); +#else RETURN_STRING(text, 1); +#endif } %% override gtk_ctree_node_get_pixmap

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