Re: Invalid UTF-8 strings
- From: Matt Bragano <maestro485 comcast net>
- To: gtkmm-list gnome org
- Subject: Re: Invalid UTF-8 strings
- Date: Fri, 01 Jun 2007 13:07:08 -0400
Great debugging techniques, thanks!
Turns out one of the strings being rendered contained some non-ASCII
characters. The functions:
Glib::locale_to_utf8()
Glib::locale_from_utf8()
did the trick. In order to render the text in a tree view I had to
convert to UTF-8, but to open a directory using Glib::Dir() I had to
convert back to the locale.
Makes perfect sense now :-)
Thanks,
Matt Bragano
Paul Davis wrote:
On Thu, 2007-05-31 at 20:14 -0500, Jonathon Jongsma wrote:
one thing that's helpful when trying to determine what's causing
warnings like this is to run your program under your favorite debugger
with the environment variable G_DEBUG=fatal-warnings set. This will
cause your program to exit when it issues a warning, at which point
you can examine what caused the error by using the debugger
my preference tends to be to set a breakpoint in g_logv. often i need to
fix up the n-th warning, not the first one, and fatal-warnings makes
that impossible.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]