Re: locale_to_utf8 crashes on WinXP with Gtkmm 2.8.4 / Glibmm 2.8.6 and Gtk+ 2.8.18 / Glib 2.10.3

2006-06-04 Thread Chris Vine
On Saturday 03 June 2006 12:19 am, Vinzenz 'evilissimo' Feenstra wrote:
 Hi,

 I'm trying to use a string with german umlauts in an application and
 Glib::locale_to_utf8 returns an invalid string.
 If I execute this:

 Glib::ustring test = Glib::locale_to_utf8(äöüß);

 and I retrieve an  invalid object Glib::ustring the debugger shows me an
 Bad Pointer in this object.

 I'm wondering if this _can_ be a Glibmm problem or if it is more a Glib
 problem?

 Btw anyone knows another GTK+ package like this one from gladewin32.sf.net?

It is very bad practice to call Glib::locale_to_utf8() on a string literal 
because it will only work if the codeset locale on the machine on which the 
code is compiled is the same as the codeset in which the string literal 
happens to have been written.  These may not even be the same if the code is 
written and compiled on the same machine (it will depend on the editor with 
which the code is being written).

If you want a string literal to be in UTF8 then write it in UTF8, or write it 
in some other known codeset and use codeset conversion which does not base 
itself on the locale.

Chris.


___
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list


Gtkmm-forge Digest, Vol 1, Issue 1143

2006-06-04 Thread gtkmm-forge-request
Send Gtkmm-forge mailing list submissions to
[EMAIL PROTECTED]

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/gtkmm-forge
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

You can reach the person managing the list at
[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than Re: Contents of Gtkmm-forge digest...


gtkmm-forge is the mailing list that receives gtkmm bug reports from bugzilla.  
A daily digest is sent to gtkmm-main, to encourage people to help fixing the 
bugs. Do not try to unsubscribe gtkmm-forge from gtkmm-list.


Today's Topics:

   1. [Bug 343741] Gdk::Window missing  'create_cairo_context' in
  drawingarea/simple tutorial example code
  (gtkmm (bugzilla.gnome.org))
   2. [Bug 343741] Gdk::Window missing  'create_cairo_context' in
  drawingarea/simple tutorial example code
  (gtkmm (bugzilla.gnome.org))
   3. [Bug 343741] Gdk::Window missing  'create_cairo_context' in
  drawingarea/simple tutorial example code
  (gtkmm (bugzilla.gnome.org))


--

Message: 1
Date: Sat,  3 Jun 2006 17:32:23 -0400 (EDT)
From: gtkmm (bugzilla.gnome.org)
[EMAIL PROTECTED]
Subject: [gtkmm bugzilla] [Bug 343741] Gdk::Window missing
'create_cairo_context' in drawingarea/simple tutorial example code
To: [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=utf-8

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=343741
 gtkmm | general | Ver: 2.6.x


jonner changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]
 Status|UNCONFIRMED |RESOLVED
 Resolution||NOTABUG




--- Comment #1 from jonner  2006-06-03 21:32 UTC ---
Thanks for reporting this, but this is not actually a bug. 
create_cairo_context() was introduced in gtkmm 2.9.x, so it won't be available
in previous versions (2.6.x in your case).  I suggest that you look at the
documentation that you installed (gtkmm24-docs.i386 2.6.2-2) for the tutorial
that applies to your version of gtkmm.

I apologize that this was not made more clear in the online documentation.


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug.
You are the assignee for the bug.



--

Message: 2
Date: Sat,  3 Jun 2006 21:08:43 -0400 (EDT)
From: gtkmm (bugzilla.gnome.org)
[EMAIL PROTECTED]
Subject: [gtkmm bugzilla] [Bug 343741] Gdk::Window missing
'create_cairo_context' in drawingarea/simple tutorial example code
To: [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=utf-8

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=343741
 gtkmm | general | Ver: 2.6.x





--- Comment #2 from Bryan Raney  2006-06-04 01:08 UTC ---
(In reply to comment #1)
 Thanks for reporting this, but this is not actually a bug. 
 create_cairo_context() was introduced in gtkmm 2.9.x, so it won't be available
 in previous versions (2.6.x in your case).  I suggest that you look at the
 documentation that you installed (gtkmm24-docs.i386 2.6.2-2) for the tutorial
 that applies to your version of gtkmm.

Thanks for the information, and for the suggestion.  I actually hadn't thought
of looking at the installed docs!

 
 I apologize that this was not made more clear in the online documentation.
 

Would it make sense for me to submit a bug report about the documentation being
less-than-clear?


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug.
You are the assignee for the bug.



--

Message: 3
Date: Sun,  4 Jun 2006 13:48:50 -0400 (EDT)
From: gtkmm (bugzilla.gnome.org)
[EMAIL PROTECTED]
Subject: [gtkmm bugzilla] [Bug 343741] Gdk::Window missing
'create_cairo_context' in drawingarea/simple tutorial example code
To: [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=utf-8

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=343741
 gtkmm | general | Ver: 2.6.x





--- Comment #3 from jonner  2006-06-04 17:48 UTC ---
 Would it make 

Re: locale_to_utf8 crashes on WinXP with Gtkmm 2.8.4 / Glibmm 2.8.6 and Gtk+ 2.8.18 / Glib 2.10.3

2006-06-04 Thread Chris Vine
On Saturday 03 June 2006 23:09, Chris Vine wrote:
 It is very bad practice to call Glib::locale_to_utf8() on a string literal
 because it will only work if the codeset locale on the machine on which the
 code is compiled is the same as the codeset in which the string literal
 happens to have been written.  These may not even be the same if the code
 is written and compiled on the same machine (it will depend on the editor
 with which the code is being written).

Actually, on reflection it is more problematic than that.  It will only work 
reliably if the codeset of the string literal as saved to file by the editor 
and compiled into the binary happens to be the same as the locale codeset 
under which the program is run by any particular user.

Chris

___
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list