modified gnucash/gnome/gnc-plugin-page-report.cpp @@ -791,6 +791,7 @@ gnc_plugin_page_report_option_change_cb(gpointer data) new_name = g_strdup(gnc_option_db_lookup_string_value(priv->cur_odb, "General", "Report name")); + printf ("here's new_name=[%s]\n", new_name); if (strcmp(old_name, new_name) != 0) { /* Bug 727130, 760711 - remove only the non-printable @@ -1097,6 +1098,7 @@ gnc_plugin_page_report_name_changed (GncPluginPage *page, const gchar *name) /* Is this a redundant call? */ old_name = gnc_option_db_lookup_string_value(priv->cur_odb, "General", "Report name"); + printf ("here's old_name=[%s]\n", old_name); DEBUG("Comparing old name '%s' to new name '%s'", old_name ? old_name : "(null)", name); if (old_name && (strcmp(old_name, name) == 0)) @@ -1903,6 +1905,7 @@ static gchar *report_create_jobname(GncPluginPageReportPrivate *priv) report_name = g_strdup(gnc_option_db_lookup_string_value(priv->cur_odb, "General", "Report name")); + printf ("here's report_name=[%s]\n", report_name); if (!report_name) report_name = g_strdup (_(default_jobname)); if (g_strcmp0(report_name, _("Printable Invoice")) == 0 modified libgnucash/engine/gnc-optiondb.cpp @@ -1261,7 +1261,8 @@ const char* gnc_option_db_lookup_string_value(GncOptionDB* odb, const char* section, const char* name) { auto value{odb->lookup_string_option(section, name)}; - return value.empty() ? nullptr : strdup(value.c_str()); + printf ("here's value in optiondb.cpp = [%s]\n", value.c_str()); + return value.empty() ? nullptr : value.c_str(); } RESULT: - open new transaction report - open options, change name to "new transaction report title" - click OK here's value in optiondb.cpp = [new transaction report title] here's new_name=[>q��] * 10:20:34 WARN Invalid utf8 string: >q�� here's value in optiondb.cpp = [new transaction report title] here's old_name=[�?q��] here's value in optiondb.cpp = [>q] here's new_name=[P6|�V] * 10:20:34 WARN Invalid utf8 string: P6|�V here's value in optiondb.cpp = [>q] here's old_name=[>q] here's value in optiondb.cpp = [P6|V] here's new_name=[P6|�V] * 10:20:34 WARN Invalid utf8 string: P6|�V * 10:20:34 WARN [gnc_option_db_destroy()] Direct Destroy called on GncOptionDB 94642090295040