Unicode symbols in debug info not printed correctly

Bug #732905 reported by Sergey "Shnatsel" Davidoff
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Luce Image Viewer
Confirmed
Low
Unassigned

Bug Description

File names in debug info are not printed correctly.

This line produces question marks:
g_debug("pointing to %s", g_filename_to_utf8( ((Image*)(current_image->data))->filename, -1, NULL, NULL, NULL));

But this line works properly:
printf("%04dx%04d file: %s\n",im->geometry->width,im->geometry->height,im->filename);

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :
Revision history for this message
Marco Lazzaroni (marcolazzaroni) wrote :

probably unicode symbols are not correctly managed by g_debug(). It's a pity not to be able to use g_debug..

Changed in luce:
status: New → Confirmed
importance: Undecided → Low
milestone: none → 1.0.0
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

I'll smoke some documentation on this if I have time.

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

I've found the source of the bug. You should use g_filename_display_basename() instead of g_filename_to_utf8() to display file names. I'm applying the fix to the source code now.

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

Well, I've applied the fix and it doesn't work again. :~/

Revision history for this message
Marco Lazzaroni (marcolazzaroni) wrote :

I don't understand if it is related to luce or to g_debug()...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.