Re: Lower case to upper case german ess-zet
Thanks for your comments. I have entered the enclosed code in the begining and I get: Headers version: 2.12 Lib version: 2.12 I have compiled the code in GNU/Linux and in Windows XP with Mingw and I get the same version 2.12, and the same results. Which version do you have used? Best regards --- gchar *strLower = \xc3\x9f; //ß; printf(\nHeaders version: %d.%d, GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION); printf(\nLib version: %d.%d, glib_major_version, glib_minor_version); --- 2007/9/11, David Nečas (Yeti) [EMAIL PROTECTED]: On Tue, Sep 11, 2007 at 06:12:53PM +, Luis Ramirez wrote: I have a problem converting german ess-zet (ß) from lower to uppercase when using g_unichar_toupper, but it works fine using g_utf8_strup. Using g_unichar_toupper I get a 0 as result. You should not, both according to my reading of GLib source code and experiment. Since the uppercase is not repesentable with a signle character, you should get the input character back from g_unichar_toupper(), exactly as the documentation states -- and this is also what I observe. Here it is a sample. The output is: Note embedding these things in mail makes them subject to abritrary reencoding and can result in recipients trying entirely different code if they are not very careful -- use \xc3\x9f representation. g_unichar_toupper. Lower:'ß', Upper:'' g_utf8_strup. Lower:'ß', Upper:'SS' I get g_unichar_toupper. Lower:'ß', Upper:'ß' g_utf8_strup. Lower:'ß', Upper:'SS' as expected. Perhaps a too old GLib? Yeti -- http://gwyddion.net/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Lower case to upper case german ess-zet
Hi I have a problem converting german ess-zet (ß) from lower to uppercase when using g_unichar_toupper, but it works fine using g_utf8_strup. Using g_unichar_toupper I get a 0 as result. Here it is a sample. The output is: g_unichar_toupper. Lower:'ß', Upper:'' g_utf8_strup. Lower:'ß', Upper:'SS' int main() { gchar *strLower = ß; // Bad conversion with g_unichar_toupper gunichar uniLower = g_utf8_get_char(strLower); gunichar uniUpper = g_unichar_toupper(uniLower); gchar strUpper[6]; gint len = g_unichar_to_utf8(uniUpper, strUpper); strUpper[len] = '\0'; printf(\ng_unichar_toupper. Lower:'%s', Upper:'%s', strLower, strUpper); // Result: g_unichar_toupper. Lower:'ß', Upper:'' //Good conversion with g_utf8_strup gchar *goodUpper = g_utf8_strup (strLower, -1); printf(\nGood. Lower:'%s', Upper:'%s', strLower, goodUpper); g_free(goodUpper); // Result: g_utf8_strup. Lower:'ß', Upper:'SS' } Regards ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Image process in gdk
Problem solved! : As I viewed first time an image with gtk_image_new_from_pixbuf, when I tried to change that image later after pushing a button, nothing happened, but by using gtk_image_set_from_pixbuf instead, the image changes to the new one (no need to use expose_event at all) Thank you 2007/5/23, Luis Ramirez [EMAIL PROTECTED]: Thank you all!. I will try to re-read the Gtk docs following your advice and I will look for theScribble sample. Luis 2007/5/20, David Nečas (Yeti) [EMAIL PROTECTED]: On Sun, May 20, 2007 at 08:39:43PM +0200, Cédric Lucantis wrote: Le dimanche 20 mai 2007 17:45, Luis Ramirez a écrit: It looks like you are confusing GdkPixbuf and GtkPixbuf. A GdkPixbuf is not a widget but only an object storing a bitmap, while a GtkPixbuf is a widget displaying a GdkPixbuf. Anyway, GtkPixbuf is deprecated so you should use GtkImage instead. I'm not sure this cleared all the confusion as GtkPixbuf does not exist. The deprecated widget is called GtkPixmap (and there's really no reason to use it) (and there's also GdkPixmap which is a completely different beast). To sum it up: GdkPixbuf -- RGB[A] pixel buffer, used for basic image data representation and manipulation. GdkPixmap -- off-screen drawable, i.e. off-screen relative of GdkWindow (both are GdkDrawables). GtkPixbuf -- does not exist. GtkPixmap -- deprecated widget, use GtkImage instead. Yeti -- http://gwyddion.net/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Image process in gdk
Thank you all!. I will try to re-read the Gtk docs following your advice and I will look for theScribble sample. Luis 2007/5/20, David Nečas (Yeti) [EMAIL PROTECTED]: On Sun, May 20, 2007 at 08:39:43PM +0200, Cédric Lucantis wrote: Le dimanche 20 mai 2007 17:45, Luis Ramirez a écrit: It looks like you are confusing GdkPixbuf and GtkPixbuf. A GdkPixbuf is not a widget but only an object storing a bitmap, while a GtkPixbuf is a widget displaying a GdkPixbuf. Anyway, GtkPixbuf is deprecated so you should use GtkImage instead. I'm not sure this cleared all the confusion as GtkPixbuf does not exist. The deprecated widget is called GtkPixmap (and there's really no reason to use it) (and there's also GdkPixmap which is a completely different beast). To sum it up: GdkPixbuf -- RGB[A] pixel buffer, used for basic image data representation and manipulation. GdkPixmap -- off-screen drawable, i.e. off-screen relative of GdkWindow (both are GdkDrawables). GtkPixbuf -- does not exist. GtkPixmap -- deprecated widget, use GtkImage instead. Yeti -- http://gwyddion.net/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list