GNOME Bugzilla – Bug 157709
gimp_text_fontname errors out on non 7 bit ascii characters
Last modified: 2005-01-10 21:20:38 UTC
Please describe the problem: Calling the gimp_text_fontname function in a gimp perl script and passing it a string with a non 7 bit ascii character results in a Gimp Script Error. Seems to happen regardless of font specified. Steps to reproduce: 1. Run this code in a gimp perl script: my $text_layer = gimp_text_fontname($img,-1,0,0,"test string ö ", 0, 0, 14, 0, "Arial"); Actual results: Receive this message: Gimp Script Error while executing: gimp_text_fontname: procedural database execution failed at Expected results: Succesful rendering of text. Does this happen every time? Yes, regardless of font name, as long as a 7 bit ascii character is part of string to render. Other information: I am using Gimp 2.0.5 for GNU/Linux, Gimp Perl 2.0 and Pango 1.6.
All(!) GIMP procedures take UTF-8 encoding as input and will fail if passed strings in a different encoding.
I've done this change to both stable and development branches in order to avoid such mistakes in the future: 2005-01-10 Sven Neumann <sven@gimp.org> * tools/pdbgen/pdb/text_tool.pdb: explicitely mention the encoding. * app/pdb/text_tool_cmds.c * libgimp/gimptexttool_pdb.c: regenerated.