mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Use scm_[to/from]_utf8_string instead of scm_[to/from]_locale_string as per guile recommendation
Notes: - in some situations the original *locale_string variant is retained. This is when locale encoded strings are processed (mostly file names). - the utf8 variants don't exist for guile 1.8. For that version these functions will be rededefined to call the locale variants. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23556 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
21fddc1f68
commit
510c20b8a9
@ -27,7 +27,7 @@ static SCM helper_scm_to_string(void *ptr_void)
|
||||
{
|
||||
helper_data_t* ptr = ptr_void;
|
||||
g_assert(ptr);
|
||||
*(ptr->msg) = gnc_scm_to_locale_string(*ptr->scm_string);
|
||||
*(ptr->msg) = gnc_scm_to_utf8_string(*ptr->scm_string);
|
||||
return SCM_UNDEFINED;
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ gfec_catcher(void *data, SCM tag, SCM throw_args)
|
||||
(void *) &helper_data,
|
||||
gfec_catcher,
|
||||
&internal_err_msg);
|
||||
// Previously: msg = gnc_scm_to_locale_string (result);
|
||||
// Previously: msg = gnc_scm_to_utf8_string (result);
|
||||
|
||||
// Did we run into an exception? Then the output argument msg is
|
||||
// not set (due to the exception), but err_msg is set and contains
|
||||
|
@ -315,7 +315,7 @@ func_op(const char *fname, int argc, void **argv)
|
||||
break;
|
||||
case VST_STRING:
|
||||
str = (char*)(vs->value);
|
||||
scmTmp = scm_from_locale_string( str );
|
||||
scmTmp = scm_from_utf8_string( str );
|
||||
break;
|
||||
default:
|
||||
/* FIXME: error */
|
||||
|
@ -125,11 +125,11 @@ gnc_quoteinfo2scm(gnc_commodity *comm)
|
||||
SWIG_TypeQuery("_p_gnc_commodity"), 0);
|
||||
|
||||
if (tz)
|
||||
info_scm = scm_cons (scm_from_locale_string (tz), info_scm);
|
||||
info_scm = scm_cons (scm_from_utf8_string (tz), info_scm);
|
||||
else
|
||||
info_scm = scm_cons (SCM_BOOL_F, info_scm);
|
||||
info_scm = scm_cons (def_comm_scm, info_scm);
|
||||
info_scm = scm_cons (comm_scm, info_scm);
|
||||
info_scm = scm_cons (name ? scm_from_locale_string (name) : SCM_BOOL_F, info_scm);
|
||||
info_scm = scm_cons (name ? scm_from_utf8_string (name) : SCM_BOOL_F, info_scm);
|
||||
return info_scm;
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ gnc_ui_account_get_tax_info_string (const Account *account)
|
||||
return g_strdup (_("Tax entity type not specified"));
|
||||
|
||||
atype = xaccAccountGetType (account);
|
||||
tax_entity_type = scm_from_locale_string (tax_type);
|
||||
tax_entity_type = scm_from_utf8_string (tax_type);
|
||||
|
||||
if (get_form == SCM_UNDEFINED)
|
||||
{
|
||||
@ -455,13 +455,13 @@ gnc_ui_account_get_tax_info_string (const Account *account)
|
||||
{
|
||||
gchar *form = NULL;
|
||||
|
||||
/* Note: using scm_to_locale_string directly here instead
|
||||
of our wrapper gnc_scm_to_locale_string. 'form' should
|
||||
/* Note: using scm_to_utf8_string directly here instead
|
||||
of our wrapper gnc_scm_to_utf8_string. 'form' should
|
||||
be freed with 'free' instead of 'g_free'. This will
|
||||
be taken care of automatically during scm_dynwind_end,
|
||||
because we inform guile of this memory allocation via
|
||||
scm_dynwind_free a little further. */
|
||||
form = scm_to_locale_string (form_scm);
|
||||
form = scm_to_utf8_string (form_scm);
|
||||
if (!form)
|
||||
{
|
||||
if (tax_related)
|
||||
@ -497,7 +497,7 @@ gnc_ui_account_get_tax_info_string (const Account *account)
|
||||
else
|
||||
{
|
||||
gchar *desc = NULL;
|
||||
desc = gnc_scm_to_locale_string (desc_scm);
|
||||
desc = gnc_scm_to_utf8_string (desc_scm);
|
||||
if (!desc)
|
||||
{
|
||||
if (tax_related)
|
||||
|
@ -311,7 +311,7 @@ gnc_split_scm_set_account(SCM split_scm, Account *account)
|
||||
if (guid_string == NULL)
|
||||
return;
|
||||
|
||||
arg = scm_from_locale_string(guid_string);
|
||||
arg = scm_from_utf8_string(guid_string);
|
||||
|
||||
scm_call_2(setters.split_scm_account_guid, split_scm, arg);
|
||||
}
|
||||
@ -337,7 +337,7 @@ gnc_split_scm_set_memo(SCM split_scm, const char *memo)
|
||||
if (memo == NULL)
|
||||
return;
|
||||
|
||||
arg = scm_from_locale_string(memo);
|
||||
arg = scm_from_utf8_string(memo);
|
||||
|
||||
scm_call_2(setters.split_scm_memo, split_scm, arg);
|
||||
}
|
||||
@ -363,7 +363,7 @@ gnc_split_scm_set_action(SCM split_scm, const char *action)
|
||||
if (action == NULL)
|
||||
return;
|
||||
|
||||
arg = scm_from_locale_string(action);
|
||||
arg = scm_from_utf8_string(action);
|
||||
|
||||
scm_call_2(setters.split_scm_action, split_scm, arg);
|
||||
}
|
||||
@ -460,7 +460,7 @@ gnc_split_scm_get_memo(SCM split_scm)
|
||||
if (!scm_is_string(result))
|
||||
return NULL;
|
||||
|
||||
return gnc_scm_to_locale_string(result);
|
||||
return gnc_scm_to_utf8_string(result);
|
||||
}
|
||||
|
||||
|
||||
@ -485,7 +485,7 @@ gnc_split_scm_get_action(SCM split_scm)
|
||||
if (!scm_is_string(result))
|
||||
return NULL;
|
||||
|
||||
return gnc_scm_to_locale_string(result);
|
||||
return gnc_scm_to_utf8_string(result);
|
||||
}
|
||||
|
||||
|
||||
@ -668,8 +668,8 @@ gnc_copy_trans_scm_onto_trans_swap_accounts(SCM trans_scm,
|
||||
|
||||
args = scm_cons(commit, args);
|
||||
|
||||
from = scm_from_locale_string(guid_to_string(guid_1));
|
||||
to = scm_from_locale_string(guid_to_string(guid_2));
|
||||
from = scm_from_utf8_string(guid_to_string(guid_1));
|
||||
to = scm_from_utf8_string(guid_to_string(guid_2));
|
||||
|
||||
map = scm_cons(scm_cons(from, to), map);
|
||||
map = scm_cons(scm_cons(to, from), map);
|
||||
@ -728,7 +728,7 @@ gnc_trans_scm_set_num(SCM trans_scm, const char *num)
|
||||
if (num == NULL)
|
||||
return;
|
||||
|
||||
arg = scm_from_locale_string(num);
|
||||
arg = scm_from_utf8_string(num);
|
||||
|
||||
scm_call_2(setters.trans_scm_num, trans_scm, arg);
|
||||
}
|
||||
@ -754,7 +754,7 @@ gnc_trans_scm_set_description(SCM trans_scm, const char *description)
|
||||
if (description == NULL)
|
||||
return;
|
||||
|
||||
arg = scm_from_locale_string(description);
|
||||
arg = scm_from_utf8_string(description);
|
||||
|
||||
scm_call_2(setters.trans_scm_description, trans_scm, arg);
|
||||
}
|
||||
@ -780,7 +780,7 @@ gnc_trans_scm_set_notes(SCM trans_scm, const char *notes)
|
||||
if (notes == NULL)
|
||||
return;
|
||||
|
||||
arg = scm_from_locale_string(notes);
|
||||
arg = scm_from_utf8_string(notes);
|
||||
|
||||
scm_call_2(setters.trans_scm_notes, trans_scm, arg);
|
||||
}
|
||||
@ -914,7 +914,7 @@ gnc_get_debit_string(GNCAccountType account_type)
|
||||
if (!scm_is_string(result))
|
||||
return NULL;
|
||||
|
||||
return scm_to_locale_string(result);
|
||||
return scm_to_utf8_string(result);
|
||||
}
|
||||
|
||||
|
||||
@ -945,7 +945,7 @@ gnc_get_credit_string(GNCAccountType account_type)
|
||||
if (!scm_is_string(result))
|
||||
return NULL;
|
||||
|
||||
return gnc_scm_to_locale_string(result);
|
||||
return gnc_scm_to_utf8_string(result);
|
||||
}
|
||||
|
||||
|
||||
|
@ -473,7 +473,7 @@ gnc_option_db_register_change_callback(GNCOptionDB *odb,
|
||||
}
|
||||
else
|
||||
{
|
||||
arg = scm_from_locale_string(name);
|
||||
arg = scm_from_utf8_string(name);
|
||||
}
|
||||
args = scm_cons(arg, args);
|
||||
|
||||
@ -484,7 +484,7 @@ gnc_option_db_register_change_callback(GNCOptionDB *odb,
|
||||
}
|
||||
else
|
||||
{
|
||||
arg = scm_from_locale_string(section);
|
||||
arg = scm_from_utf8_string(section);
|
||||
}
|
||||
args = scm_cons(arg, args);
|
||||
|
||||
@ -914,7 +914,7 @@ gnc_option_permissible_value_name(GNCOption *option, int index)
|
||||
if (!scm_is_string(name))
|
||||
return NULL;
|
||||
|
||||
return gnc_scm_to_locale_string (name);
|
||||
return gnc_scm_to_utf8_string (name);
|
||||
}
|
||||
|
||||
|
||||
@ -945,7 +945,7 @@ gnc_option_permissible_value_description(GNCOption *option, int index)
|
||||
if (!scm_is_string(help))
|
||||
return NULL;
|
||||
|
||||
return gnc_scm_to_locale_string (help);
|
||||
return gnc_scm_to_utf8_string (help);
|
||||
}
|
||||
|
||||
|
||||
@ -1693,7 +1693,7 @@ gnc_commit_option(GNCOption *option)
|
||||
return;
|
||||
}
|
||||
|
||||
message = gnc_scm_to_locale_string (oops);
|
||||
message = gnc_scm_to_utf8_string (oops);
|
||||
name = gnc_option_name(option);
|
||||
section = gnc_option_section(option);
|
||||
|
||||
@ -1896,7 +1896,7 @@ gnc_option_db_get_default_section(GNCOptionDB *odb)
|
||||
if (!scm_is_string(value))
|
||||
return NULL;
|
||||
|
||||
return gnc_scm_to_locale_string (value);
|
||||
return gnc_scm_to_utf8_string (value);
|
||||
}
|
||||
|
||||
|
||||
@ -2002,7 +2002,7 @@ gnc_option_db_lookup_string_option(GNCOptionDB *odb,
|
||||
{
|
||||
value = scm_call_0(getter);
|
||||
if (scm_is_string(value))
|
||||
return gnc_scm_to_locale_string (value);
|
||||
return gnc_scm_to_utf8_string (value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2549,7 +2549,7 @@ gnc_option_db_set_string_option(GNCOptionDB *odb,
|
||||
return FALSE;
|
||||
|
||||
if (value)
|
||||
scm_value = scm_from_locale_string(value);
|
||||
scm_value = scm_from_utf8_string(value);
|
||||
else
|
||||
scm_value = SCM_BOOL_F;
|
||||
|
||||
@ -2737,7 +2737,7 @@ gboolean gnc_dateformat_option_value_parse(SCM value, QofDateFormat *format,
|
||||
break;
|
||||
|
||||
if (custom)
|
||||
*custom = gnc_scm_to_locale_string (val);
|
||||
*custom = gnc_scm_to_utf8_string (val);
|
||||
|
||||
return FALSE;
|
||||
|
||||
@ -2756,7 +2756,7 @@ SCM gnc_dateformat_option_set_value(QofDateFormat format, GNCDateMonthFormat mon
|
||||
|
||||
/* build the list in reverse order */
|
||||
if (custom)
|
||||
val = scm_from_locale_string(custom);
|
||||
val = scm_from_utf8_string(custom);
|
||||
else
|
||||
val = SCM_BOOL_F;
|
||||
value = scm_cons(val, value);
|
||||
|
@ -23,7 +23,7 @@ test_query (Query *q, SCM val2str)
|
||||
args = scm_cons (scm_q, SCM_EOL);
|
||||
str_q = scm_apply (val2str, args, SCM_EOL);
|
||||
|
||||
args = scm_cons (scm_from_locale_string ("'"), scm_cons (str_q, SCM_EOL));
|
||||
args = scm_cons (scm_from_utf8_string ("'"), scm_cons (str_q, SCM_EOL));
|
||||
str_q = scm_string_append (args);
|
||||
|
||||
scm_display (str_q, SCM_UNDEFINED);
|
||||
|
@ -27,10 +27,10 @@ test_query (Query *q, SCM val2str)
|
||||
args = scm_cons (scm_q, SCM_EOL);
|
||||
str_q = scm_apply (val2str, args, SCM_EOL);
|
||||
|
||||
args = scm_cons (scm_from_locale_string ("'"), scm_cons (str_q, SCM_EOL));
|
||||
args = scm_cons (scm_from_utf8_string ("'"), scm_cons (str_q, SCM_EOL));
|
||||
str_q = scm_string_append (args);
|
||||
|
||||
str2 = gnc_scm_to_locale_string (str_q);
|
||||
str2 = gnc_scm_to_utf8_string (str_q);
|
||||
if (str2)
|
||||
{
|
||||
res_q = scm_c_eval_string (str2);
|
||||
|
@ -19,7 +19,7 @@ typedef char gchar;
|
||||
%typemap (out) char * {
|
||||
$result = SCM_UNSPECIFIED;
|
||||
if ($1) {
|
||||
$result = scm_from_locale_string((const char *)$1);
|
||||
$result = scm_from_utf8_string((const char *)$1);
|
||||
}
|
||||
if (!$1 || !scm_is_true($result)) {
|
||||
$result = scm_c_make_string(0, SCM_UNDEFINED);
|
||||
|
@ -651,7 +651,7 @@ gnc_invoice_window_print_invoice(GncInvoice *invoice)
|
||||
g_return_if_fail (scm_is_procedure (func));
|
||||
|
||||
arg = SWIG_NewPointerObj(invoice, SWIG_TypeQuery("_p__gncInvoice"), 0);
|
||||
arg2 = scm_from_locale_string(reportname);
|
||||
arg2 = scm_from_utf8_string(reportname);
|
||||
args = scm_cons2 (arg, arg2, args);
|
||||
|
||||
/* scm_gc_protect_object(func); */
|
||||
|
@ -915,7 +915,7 @@ build_aging_report (GncOwnerType owner_type)
|
||||
g_return_val_if_fail (arg != SCM_UNDEFINED, -1);
|
||||
|
||||
/* Option Report title */
|
||||
arg = scm_from_locale_string (report_title);
|
||||
arg = scm_from_utf8_string (report_title);
|
||||
args = scm_cons (arg, args);
|
||||
|
||||
/* Option Account - Using False to select default account
|
||||
|
@ -31,10 +31,42 @@
|
||||
static QofLogModule log_module = G_LOG_DOMAIN;
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_scm_to_utf8_string *
|
||||
* returns the string representation of the scm string in *
|
||||
* a newly allocated gchar * or NULL if it can't be retrieved. *
|
||||
* *
|
||||
* Args: symbol_value - the scm symbol *
|
||||
* Returns: newly allocated gchar * or NULL, should be freed with *
|
||||
* g_free by the caller *
|
||||
\********************************************************************/
|
||||
gchar *gnc_scm_to_utf8_string(SCM scm_string)
|
||||
{
|
||||
if (scm_is_string (scm_string))
|
||||
{
|
||||
gchar* s;
|
||||
char * str;
|
||||
|
||||
str = scm_to_utf8_string(scm_string);
|
||||
s = g_strdup(str);
|
||||
free (str);
|
||||
return s;
|
||||
}
|
||||
|
||||
/* Unable to extract string from the symbol...*/
|
||||
PERR("bad value\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_scm_to_locale_string *
|
||||
* returns the string representation of the scm string in *
|
||||
* a newly allocated gchar * or NULL if it can't be retrieved. *
|
||||
* The string will be encoded in the current locale's encoding. *
|
||||
* Note: this function should only be use to convert filenames or *
|
||||
* strings from the environment. Or other strings that are in the *
|
||||
* system locale. *
|
||||
* *
|
||||
* Args: symbol_value - the scm symbol *
|
||||
* Returns: newly allocated gchar * or NULL, should be freed with *
|
||||
@ -77,7 +109,7 @@ gnc_scm_symbol_to_locale_string(SCM symbol_value)
|
||||
SCM string_value = scm_symbol_to_string (symbol_value);
|
||||
if (scm_is_string (string_value))
|
||||
{
|
||||
char *tmp = scm_to_locale_string (string_value);
|
||||
char *tmp = scm_to_utf8_string (string_value);
|
||||
gchar *str = g_strdup (tmp);
|
||||
free (tmp);
|
||||
return str;
|
||||
@ -110,7 +142,7 @@ gnc_scm_call_1_to_string(SCM func, SCM arg)
|
||||
|
||||
if (scm_is_string(value))
|
||||
{
|
||||
return gnc_scm_to_locale_string(value);
|
||||
return gnc_scm_to_utf8_string(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -265,7 +297,7 @@ gchar *gnc_scm_strip_comments (SCM scm_text)
|
||||
gchar *raw_text, *text, **splits;
|
||||
gint i, j;
|
||||
|
||||
raw_text = gnc_scm_to_locale_string (scm_text);
|
||||
raw_text = gnc_scm_to_utf8_string (scm_text);
|
||||
splits = g_strsplit(raw_text, "\n", -1);
|
||||
for (i = j = 0; splits[i]; i++)
|
||||
{
|
||||
|
@ -31,6 +31,16 @@
|
||||
* a guile string.
|
||||
*
|
||||
* Returns a newly allocated string that must be freed with g_free*/
|
||||
gchar * gnc_scm_to_utf8_string(SCM scm_string);
|
||||
|
||||
/** Helper function to get the string representation of
|
||||
* a guile string.
|
||||
* The string will be encoded in the current locale's encoding.
|
||||
* Note: this function should only be use to convert filenames or
|
||||
* strings from the environment. Or other strings that are in the
|
||||
* system locale.
|
||||
*
|
||||
* Returns a newly allocated string that must be freed with g_free*/
|
||||
gchar * gnc_scm_to_locale_string(SCM scm_string);
|
||||
|
||||
/** Helper function to get the string representation of
|
||||
|
@ -314,7 +314,7 @@ gnc_guid2scm(GncGUID guid)
|
||||
if (!guid_to_string_buff(&guid, string))
|
||||
return SCM_BOOL_F;
|
||||
|
||||
return scm_from_locale_string(string);
|
||||
return scm_from_utf8_string(string);
|
||||
}
|
||||
|
||||
GncGUID
|
||||
@ -328,7 +328,7 @@ gnc_scm2guid(SCM guid_scm)
|
||||
{
|
||||
return *guid_null();
|
||||
}
|
||||
str = gnc_scm_to_locale_string (guid_scm);
|
||||
str = gnc_scm_to_utf8_string (guid_scm);
|
||||
string_to_guid(str, &guid);
|
||||
g_free (str);
|
||||
return guid;
|
||||
@ -348,7 +348,7 @@ gnc_guid_p(SCM guid_scm)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
str = gnc_scm_to_locale_string (guid_scm);
|
||||
str = gnc_scm_to_utf8_string (guid_scm);
|
||||
return_int = string_to_guid(str, &guid);
|
||||
g_free (str);
|
||||
return return_int;
|
||||
@ -677,7 +677,7 @@ gnc_query_path2scm (const GSList *path)
|
||||
const char *key = node->data;
|
||||
|
||||
if (key)
|
||||
path_scm = scm_cons (scm_from_locale_string (key), path_scm);
|
||||
path_scm = scm_cons (scm_from_utf8_string (key), path_scm);
|
||||
}
|
||||
|
||||
return scm_reverse (path_scm);
|
||||
@ -700,7 +700,7 @@ gnc_query_scm2path (SCM path_scm)
|
||||
if (!scm_is_string (key_scm))
|
||||
break;
|
||||
|
||||
key = gnc_scm_to_locale_string(key_scm);
|
||||
key = gnc_scm_to_utf8_string(key_scm);
|
||||
path = g_slist_prepend (path, key);
|
||||
path_scm = SCM_CDR (path_scm);
|
||||
}
|
||||
@ -753,7 +753,7 @@ gnc_kvp_value2scm (const KvpValue *value)
|
||||
|
||||
case KVP_TYPE_STRING:
|
||||
string = kvp_value_get_string (value);
|
||||
scm = string ? scm_from_locale_string (string) : SCM_BOOL_F;
|
||||
scm = string ? scm_from_utf8_string (string) : SCM_BOOL_F;
|
||||
break;
|
||||
|
||||
case KVP_TYPE_GUID:
|
||||
@ -813,7 +813,7 @@ kvp_frame_slot2scm (const char *key, KvpValue *value, gpointer data)
|
||||
SCM key_scm;
|
||||
SCM pair;
|
||||
|
||||
key_scm = key ? scm_from_locale_string (key) : SCM_BOOL_F;
|
||||
key_scm = key ? scm_from_utf8_string (key) : SCM_BOOL_F;
|
||||
value_scm = gnc_kvp_value2scm (value);
|
||||
pair = scm_cons (key_scm, value_scm);
|
||||
|
||||
@ -869,7 +869,7 @@ gnc_scm2KvpValue (SCM value_scm)
|
||||
case KVP_TYPE_STRING:
|
||||
{
|
||||
gchar * str;
|
||||
str = gnc_scm_to_locale_string (val_scm);
|
||||
str = gnc_scm_to_utf8_string (val_scm);
|
||||
value = kvp_value_new_string (str);
|
||||
g_free (str);
|
||||
break;
|
||||
@ -983,7 +983,7 @@ gnc_scm2KvpFrame (SCM frame_scm)
|
||||
if (!scm_is_string (key_scm))
|
||||
continue;
|
||||
|
||||
key = scm_to_locale_string (key_scm); /* key should be freed with free !
|
||||
key = scm_to_utf8_string (key_scm); /* key should be freed with free !
|
||||
This is automatically taken care
|
||||
of by scm_dynwind_free below. */
|
||||
scm_dynwind_begin (0);
|
||||
@ -1028,7 +1028,7 @@ gnc_queryterm2scm (const QofQueryTerm *qt)
|
||||
|
||||
qt_scm = scm_cons (scm_from_long (pdata->options), qt_scm);
|
||||
qt_scm = scm_cons (SCM_BOOL (pdata->is_regex), qt_scm);
|
||||
qt_scm = scm_cons (pdata->matchstring ? scm_from_locale_string (pdata->matchstring) : SCM_BOOL_F, qt_scm);
|
||||
qt_scm = scm_cons (pdata->matchstring ? scm_from_utf8_string (pdata->matchstring) : SCM_BOOL_F, qt_scm);
|
||||
|
||||
}
|
||||
else if (!g_strcmp0 (pd->type_name, QOF_TYPE_DATE))
|
||||
@ -1081,7 +1081,7 @@ gnc_queryterm2scm (const QofQueryTerm *qt)
|
||||
query_char_t pdata = (query_char_t) pd;
|
||||
|
||||
qt_scm = scm_cons (scm_from_long (pdata->options), qt_scm);
|
||||
qt_scm = scm_cons (pdata->char_list ? scm_from_locale_string (pdata->char_list) : SCM_BOOL_F, qt_scm);
|
||||
qt_scm = scm_cons (pdata->char_list ? scm_from_utf8_string (pdata->char_list) : SCM_BOOL_F, qt_scm);
|
||||
|
||||
}
|
||||
else if (!g_strcmp0 (pd->type_name, QOF_TYPE_KVP))
|
||||
@ -1167,7 +1167,7 @@ gnc_scm2query_term_query_v2 (SCM qt_scm)
|
||||
qt_scm = SCM_CDR (qt_scm);
|
||||
if (!scm_is_string (scm)) break;
|
||||
|
||||
matchstring = gnc_scm_to_locale_string (scm);
|
||||
matchstring = gnc_scm_to_utf8_string (scm);
|
||||
|
||||
pd = qof_query_string_predicate (compare_how, matchstring,
|
||||
options, is_regex);
|
||||
@ -1289,7 +1289,7 @@ gnc_scm2query_term_query_v2 (SCM qt_scm)
|
||||
qt_scm = SCM_CDR (qt_scm);
|
||||
if (!scm_is_string (scm))
|
||||
break;
|
||||
char_list = gnc_scm_to_locale_string (scm);
|
||||
char_list = gnc_scm_to_utf8_string (scm);
|
||||
|
||||
pd = qof_query_char_predicate (options, char_list);
|
||||
g_free (char_list);
|
||||
@ -1560,7 +1560,7 @@ gnc_scm2query_term_query_v1 (SCM query_term_scm)
|
||||
|
||||
scm = SCM_CAR (query_term_scm);
|
||||
query_term_scm = SCM_CDR (query_term_scm);
|
||||
matchstring = gnc_scm_to_locale_string (scm);
|
||||
matchstring = gnc_scm_to_utf8_string (scm);
|
||||
|
||||
if (!g_strcmp0 (pr_type, "pr-action"))
|
||||
{
|
||||
@ -1646,7 +1646,7 @@ gnc_scm2query_term_query_v1 (SCM query_term_scm)
|
||||
/* id type */
|
||||
scm = SCM_CAR (query_term_scm);
|
||||
query_term_scm = SCM_CDR (query_term_scm);
|
||||
id_type = (QofIdType) gnc_scm_to_locale_string (scm);
|
||||
id_type = (QofIdType) gnc_scm_to_utf8_string (scm);
|
||||
|
||||
xaccQueryAddGUIDMatch (q, &guid, id_type, QOF_QUERY_OR);
|
||||
g_free ((void *) id_type);
|
||||
|
@ -102,7 +102,7 @@ gnc_glist_string_to_scm(GList *glist)
|
||||
for (node = glist; node; node = node->next)
|
||||
{
|
||||
if (node->data)
|
||||
list = scm_cons (scm_from_locale_string(node->data), list);
|
||||
list = scm_cons (scm_from_utf8_string(node->data), list);
|
||||
else
|
||||
list = scm_cons (SCM_BOOL_F, list);
|
||||
}
|
||||
@ -131,7 +131,7 @@ gnc_scm_to_glist_string(SCM list)
|
||||
{
|
||||
gchar * str;
|
||||
|
||||
str = gnc_scm_to_locale_string (SCM_CAR(list));
|
||||
str = gnc_scm_to_utf8_string (SCM_CAR(list));
|
||||
if (str)
|
||||
glist = g_list_prepend (glist, g_strdup (str));
|
||||
g_free (str);
|
||||
@ -153,7 +153,7 @@ gnc_scm_to_gslist_string(SCM list)
|
||||
{
|
||||
gchar * str;
|
||||
|
||||
str = gnc_scm_to_locale_string (SCM_CAR(list));
|
||||
str = gnc_scm_to_utf8_string (SCM_CAR(list));
|
||||
if (str)
|
||||
gslist = g_slist_prepend (gslist, g_strdup (str));
|
||||
g_free (str);
|
||||
|
@ -49,7 +49,7 @@ gnc_scm_to_kvp_value_ptr(SCM val)
|
||||
{
|
||||
gchar *newstr;
|
||||
KvpValue *ret;
|
||||
newstr = gnc_scm_to_locale_string (val);
|
||||
newstr = gnc_scm_to_utf8_string (val);
|
||||
ret = kvp_value_new_string(newstr);
|
||||
g_free (newstr);
|
||||
return ret;
|
||||
@ -84,7 +84,7 @@ gnc_kvp_value_ptr_to_scm(KvpValue* val)
|
||||
break;
|
||||
case KVP_TYPE_STRING:
|
||||
string = kvp_value_get_string(val);
|
||||
return string ? scm_from_locale_string(string) : SCM_BOOL_F;
|
||||
return string ? scm_from_utf8_string(string) : SCM_BOOL_F;
|
||||
break;
|
||||
case KVP_TYPE_GUID:
|
||||
{
|
||||
|
@ -2177,7 +2177,7 @@ gnc_option_set_ui_value_string (GNCOption *option, gboolean use_default,
|
||||
{
|
||||
const gchar *string;
|
||||
|
||||
string = gnc_scm_to_locale_string (value);
|
||||
string = gnc_scm_to_utf8_string (value);
|
||||
gtk_entry_set_text(GTK_ENTRY(widget), string);
|
||||
g_free ((gpointer *) string);
|
||||
return FALSE;
|
||||
@ -2201,7 +2201,7 @@ gnc_option_set_ui_value_text (GNCOption *option, gboolean use_default,
|
||||
{
|
||||
const gchar *string;
|
||||
|
||||
string = gnc_scm_to_locale_string (value);
|
||||
string = gnc_scm_to_utf8_string (value);
|
||||
gtk_text_buffer_set_text (buffer, string, scm_c_string_length(value));
|
||||
g_free ((gpointer *) string);
|
||||
return FALSE;
|
||||
@ -2475,7 +2475,7 @@ gnc_option_set_ui_value_font (GNCOption *option, gboolean use_default,
|
||||
{
|
||||
const gchar *string;
|
||||
|
||||
string = gnc_scm_to_locale_string (value);
|
||||
string = gnc_scm_to_utf8_string (value);
|
||||
if ((string != NULL) && (*string != '\0'))
|
||||
{
|
||||
GtkFontButton *font_button = GTK_FONT_BUTTON(widget);
|
||||
@ -2636,7 +2636,7 @@ gnc_option_get_ui_value_string (GNCOption *option, GtkWidget *widget)
|
||||
SCM result;
|
||||
|
||||
string = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1);
|
||||
result = scm_from_locale_string(string ? string : "");
|
||||
result = scm_from_utf8_string(string ? string : "");
|
||||
g_free(string);
|
||||
return result;
|
||||
}
|
||||
@ -2648,7 +2648,7 @@ gnc_option_get_ui_value_text (GNCOption *option, GtkWidget *widget)
|
||||
SCM result;
|
||||
|
||||
string = xxxgtk_textview_get_text (GTK_TEXT_VIEW(widget));
|
||||
result = scm_from_locale_string(string ? string : "");
|
||||
result = scm_from_utf8_string(string ? string : "");
|
||||
g_free(string);
|
||||
return result;
|
||||
}
|
||||
@ -2869,7 +2869,7 @@ gnc_option_get_ui_value_font (GNCOption *option, GtkWidget *widget)
|
||||
const gchar * string;
|
||||
|
||||
string = gtk_font_button_get_font_name(font_button);
|
||||
return (string ? scm_from_locale_string(string) : SCM_BOOL_F);
|
||||
return (string ? scm_from_utf8_string(string) : SCM_BOOL_F);
|
||||
}
|
||||
|
||||
static SCM
|
||||
@ -2880,7 +2880,7 @@ gnc_option_get_ui_value_pixmap (GNCOption *option, GtkWidget *widget)
|
||||
|
||||
string = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget));
|
||||
DEBUG("filename %s", string ? string : "(null)");
|
||||
result = scm_from_locale_string(string ? string : "");
|
||||
result = scm_from_utf8_string(string ? string : "");
|
||||
g_free(string);
|
||||
return result;
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ gnc_extension_path (SCM extension, char **fullpath)
|
||||
if (scm_is_string(item))
|
||||
{
|
||||
gchar* s;
|
||||
s = gnc_scm_to_locale_string(item);
|
||||
s = gnc_scm_to_utf8_string(item);
|
||||
|
||||
if (i == 1)
|
||||
strings[i] = g_strdup(s);
|
||||
|
@ -242,7 +242,7 @@ load_txf_info (gint acct_category, TaxInfoDialog *ti_dialog)
|
||||
}
|
||||
else
|
||||
{
|
||||
tax_entity_type = scm_from_locale_string (ti_dialog->tax_type);
|
||||
tax_entity_type = scm_from_utf8_string (ti_dialog->tax_type);
|
||||
}
|
||||
|
||||
switch (acct_category)
|
||||
@ -337,19 +337,19 @@ load_txf_info (gint acct_category, TaxInfoDialog *ti_dialog)
|
||||
|
||||
scm = scm_call_3 (getters.form, category, code_scm, tax_entity_type);
|
||||
if (scm_is_string(scm))
|
||||
txf_info->form = gnc_scm_to_locale_string(scm);
|
||||
txf_info->form = gnc_scm_to_utf8_string(scm);
|
||||
else
|
||||
txf_info->form = g_strdup ("");
|
||||
|
||||
scm = scm_call_3 (getters.description, category, code_scm, tax_entity_type);
|
||||
if (scm_is_string(scm))
|
||||
txf_info->description = gnc_scm_to_locale_string(scm);
|
||||
txf_info->description = gnc_scm_to_utf8_string(scm);
|
||||
else
|
||||
txf_info->description = g_strdup ("");
|
||||
|
||||
scm = scm_call_2 (getters.help, category, code_scm);
|
||||
if (scm_is_string(scm))
|
||||
help_text = gnc_scm_to_locale_string(scm);
|
||||
help_text = gnc_scm_to_utf8_string(scm);
|
||||
else
|
||||
help_text = g_strdup ("");
|
||||
|
||||
@ -377,7 +377,7 @@ load_txf_info (gint acct_category, TaxInfoDialog *ti_dialog)
|
||||
line_year = scm_is_bool (SCM_CAR (year_scm)) ? 0 :
|
||||
scm_to_int (SCM_CAR (year_scm));
|
||||
if (scm_is_string((SCM_CAR (SCM_CDR (year_scm)))))
|
||||
line = gnc_scm_to_locale_string((SCM_CAR (SCM_CDR
|
||||
line = gnc_scm_to_utf8_string((SCM_CAR (SCM_CDR
|
||||
(year_scm))));
|
||||
else
|
||||
line = g_strdup ("");
|
||||
@ -486,13 +486,13 @@ load_tax_entity_type_list (TaxInfoDialog *ti_dialog)
|
||||
|
||||
scm = scm_call_1 (getters.tax_entity_type, type_scm);
|
||||
if (scm_is_string(scm))
|
||||
tax_type_info->type = gnc_scm_to_locale_string(scm);
|
||||
tax_type_info->type = gnc_scm_to_utf8_string(scm);
|
||||
else
|
||||
tax_type_info->type = g_strdup ("");
|
||||
|
||||
scm = scm_call_1 (getters.tax_entity_desc, type_scm);
|
||||
if (scm_is_string(scm))
|
||||
tax_type_info->description = gnc_scm_to_locale_string(scm);
|
||||
tax_type_info->description = gnc_scm_to_utf8_string(scm);
|
||||
else
|
||||
tax_type_info->description = g_strdup ("");
|
||||
|
||||
|
@ -2616,15 +2616,15 @@ report_helper (GNCLedgerDisplay *ledger, Split *split, Query *query)
|
||||
g_return_val_if_fail (scm_is_procedure (func), -1);
|
||||
|
||||
tmp = gnc_split_register_get_credit_string (reg);
|
||||
arg = scm_from_locale_string (tmp ? tmp : _("Credit"));
|
||||
arg = scm_from_utf8_string (tmp ? tmp : _("Credit"));
|
||||
args = scm_cons (arg, args);
|
||||
|
||||
tmp = gnc_split_register_get_debit_string (reg);
|
||||
arg = scm_from_locale_string (tmp ? tmp : _("Debit"));
|
||||
arg = scm_from_utf8_string (tmp ? tmp : _("Debit"));
|
||||
args = scm_cons (arg, args);
|
||||
|
||||
str = gnc_reg_get_name (ledger, FALSE);
|
||||
arg = scm_from_locale_string (str ? str : "");
|
||||
arg = scm_from_utf8_string (str ? str : "");
|
||||
args = scm_cons (arg, args);
|
||||
g_free (str);
|
||||
|
||||
|
@ -2460,14 +2460,14 @@ report_helper (GNCLedgerDisplay2 *ledger, Split *split, Query *query) //this wor
|
||||
g_return_val_if_fail (scm_is_procedure (func), -1);
|
||||
tmp = gnc_tree_view_split_reg_get_credit_debit_string (view, TRUE);
|
||||
|
||||
arg = scm_from_locale_string (tmp ? tmp : _("Credit"));
|
||||
arg = scm_from_utf8_string (tmp ? tmp : _("Credit"));
|
||||
args = scm_cons (arg, args);
|
||||
tmp = gnc_tree_view_split_reg_get_credit_debit_string (view, FALSE);
|
||||
arg = scm_from_locale_string (tmp ? tmp : _("Debit"));
|
||||
arg = scm_from_utf8_string (tmp ? tmp : _("Debit"));
|
||||
args = scm_cons (arg, args);
|
||||
|
||||
str = gnc_reg_get_name (ledger, FALSE);
|
||||
arg = scm_from_locale_string (str ? str : "");
|
||||
arg = scm_from_utf8_string (str ? str : "");
|
||||
args = scm_cons (arg, args);
|
||||
g_free (str);
|
||||
|
||||
|
@ -20,8 +20,10 @@
|
||||
#include <libguile.h> /* for SCM_MAJOR_VERSION etc */
|
||||
|
||||
/* Give Guile 1.8 a 2.0-like interface */
|
||||
#if (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 8)
|
||||
#if (SCM_MAJOR_VERSION < 2)
|
||||
# define scm_c_string_length scm_i_string_length
|
||||
# define scm_from_utf8_string scm_from_locale_string
|
||||
# define scm_to_utf8_string scm_to_locale_string
|
||||
#endif
|
||||
|
||||
/* Convenience macros */
|
||||
|
@ -2095,7 +2095,7 @@ gnc_ui_qif_import_loaded_files_prepare (GtkAssistant *assistant,
|
||||
SCM fix_default = scm_c_eval_string("qif-import:fix-from-acct");
|
||||
SCM scm_name;
|
||||
|
||||
scm_name = scm_from_locale_string(acct_name ? acct_name : "");
|
||||
scm_name = scm_from_utf8_string(acct_name ? acct_name : "");
|
||||
scm_call_2(fix_default, wind->selected_file, scm_name);
|
||||
|
||||
/* Enable the assistant Forward Button */
|
||||
@ -2821,7 +2821,7 @@ gnc_ui_qif_import_convert_progress_start_cb(GtkButton * button,
|
||||
wind->cat_map_info,
|
||||
wind->memo_map_info,
|
||||
wind->security_hash,
|
||||
scm_from_locale_string(currname ? currname : ""),
|
||||
scm_from_utf8_string(currname ? currname : ""),
|
||||
wind->transaction_status,
|
||||
progress),
|
||||
SCM_EOL);
|
||||
|
@ -93,7 +93,7 @@ acct_tree_add_accts(SCM accts,
|
||||
}
|
||||
|
||||
if (scm_is_string(SCM_CAR(current)))
|
||||
compname = gnc_scm_to_locale_string (SCM_CAR(current));
|
||||
compname = gnc_scm_to_utf8_string (SCM_CAR(current));
|
||||
else
|
||||
compname = g_strdup("");
|
||||
|
||||
@ -242,7 +242,7 @@ gnc_ui_qif_account_picker_new_cb(GtkButton * w, gpointer user_data)
|
||||
/* Save the full name and update the map entry. */
|
||||
g_free(wind->selected_name);
|
||||
wind->selected_name = fullname;
|
||||
scm_call_2(name_setter, wind->map_entry, scm_from_locale_string(fullname));
|
||||
scm_call_2(name_setter, wind->map_entry, scm_from_utf8_string(fullname));
|
||||
}
|
||||
gtk_widget_destroy(dlg);
|
||||
|
||||
@ -272,7 +272,7 @@ gnc_ui_qif_account_picker_changed_cb(GtkTreeSelection *selection,
|
||||
ACCOUNT_COL_FULLNAME, &wind->selected_name,
|
||||
-1);
|
||||
scm_call_2(name_setter, wind->map_entry,
|
||||
wind->selected_name ? scm_from_locale_string(wind->selected_name) : SCM_BOOL_F);
|
||||
wind->selected_name ? scm_from_utf8_string(wind->selected_name) : SCM_BOOL_F);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -342,7 +342,7 @@ qif_account_picker_dialog(QIFImportWindow * qif_wind, SCM map_entry)
|
||||
|
||||
/* Set the initial account to be selected. */
|
||||
if (scm_is_string(orig_acct))
|
||||
wind->selected_name = gnc_scm_to_locale_string (orig_acct);
|
||||
wind->selected_name = gnc_scm_to_utf8_string (orig_acct);
|
||||
|
||||
builder = gtk_builder_new();
|
||||
gnc_builder_add_from_file (builder, "dialog-account-picker.glade", "QIF Import Account Picker");
|
||||
|
@ -880,7 +880,7 @@ gnc_split_register_auto_completion (SplitRegister *reg,
|
||||
gnc_get_current_book ());
|
||||
g_assert(pending_trans == trans);
|
||||
|
||||
gnc_copy_trans_onto_trans (auto_trans, trans, FALSE, FALSE);
|
||||
xaccTransCopyOnto (auto_trans, trans);
|
||||
blank_split = NULL;
|
||||
|
||||
if (gnc_split_register_get_default_account (reg) != NULL)
|
||||
|
@ -630,10 +630,9 @@ gnc_split_register_duplicate_current (SplitRegister *reg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
new_trans = xaccMallocTransaction (gnc_get_current_book ());
|
||||
new_trans = xaccTransClone (trans);
|
||||
|
||||
xaccTransBeginEdit (new_trans);
|
||||
gnc_copy_trans_onto_trans (trans, new_trans, FALSE, FALSE);
|
||||
xaccTransSetDatePostedSecsNormalized (new_trans, date);
|
||||
/* We also must set a new DateEntered on the new entry
|
||||
* because otherwise the ordering is not deterministic */
|
||||
|
@ -152,8 +152,8 @@ update_report_list(GtkListStore *store, CustomReportDialog *crd)
|
||||
for (i = 0; !scm_is_null(rpt_guids); i++)
|
||||
{
|
||||
GncGUID *guid = guid_malloc ();
|
||||
gchar *guid_str = scm_to_locale_string (SCM_CAR(rpt_guids));
|
||||
gchar *name = gnc_scm_to_locale_string (scm_call_2(template_menu_name, SCM_CAR(rpt_guids), SCM_BOOL_F));
|
||||
gchar *guid_str = scm_to_utf8_string (SCM_CAR(rpt_guids));
|
||||
gchar *name = gnc_scm_to_utf8_string (scm_call_2(template_menu_name, SCM_CAR(rpt_guids), SCM_BOOL_F));
|
||||
|
||||
if (string_to_guid (guid_str, guid))
|
||||
{
|
||||
@ -273,7 +273,7 @@ custom_report_edit_report_name (SCM guid,
|
||||
gchar *new_name)
|
||||
{
|
||||
SCM rename_report = scm_c_eval_string("gnc:rename-report");
|
||||
SCM new_name_scm = scm_from_locale_string(new_name);
|
||||
SCM new_name_scm = scm_from_utf8_string(new_name);
|
||||
|
||||
if (scm_is_null(guid) || !new_name || (*new_name == '\0'))
|
||||
return;
|
||||
@ -300,7 +300,7 @@ custom_report_delete (SCM guid, CustomReportDialog *crd)
|
||||
if (scm_is_null (guid))
|
||||
return;
|
||||
|
||||
report_name = gnc_scm_to_locale_string(scm_call_2(template_menu_name, guid, SCM_BOOL_F));
|
||||
report_name = gnc_scm_to_utf8_string(scm_call_2(template_menu_name, guid, SCM_BOOL_F));
|
||||
|
||||
/* we must confirm the user wants to delete their precious custom report! */
|
||||
if (gnc_verify_dialog(crd->dialog, FALSE, "Are you sure you want to delete %s?", report_name))
|
||||
@ -350,7 +350,7 @@ get_custom_report_selection(CustomReportDialog *crd,
|
||||
return SCM_EOL;
|
||||
|
||||
}
|
||||
return scm_from_locale_string (guid_str);
|
||||
return scm_from_utf8_string (guid_str);
|
||||
}
|
||||
|
||||
|
||||
@ -380,7 +380,7 @@ custom_report_list_view_row_activated_cb(GtkTreeView *view, GtkTreePath *path,
|
||||
guid_str = g_new0 (gchar, GUID_ENCODING_LENGTH+1 );
|
||||
guid_to_string_buff (guid, guid_str);
|
||||
|
||||
custom_report_run_report(scm_from_locale_string (guid_str), crd);
|
||||
custom_report_run_report(scm_from_utf8_string (guid_str), crd);
|
||||
}
|
||||
}
|
||||
|
||||
@ -431,7 +431,7 @@ void custom_report_name_edited_cb(GtkCellRendererText *renderer, gchar *path, gc
|
||||
CustomReportDialog *crd = data;
|
||||
SCM guid = get_custom_report_selection(crd, _("Unable to change report name."));
|
||||
SCM unique_name_func = scm_c_eval_string("gnc:report-template-has-unique-name?");
|
||||
SCM new_name_scm = scm_from_locale_string(new_text);
|
||||
SCM new_name_scm = scm_from_utf8_string(new_text);
|
||||
|
||||
g_object_set(G_OBJECT(crd->namerenderer), "editable", FALSE, NULL);
|
||||
if (scm_is_null (guid))
|
||||
@ -536,7 +536,7 @@ void gnc_ui_custom_report_edit_name (GncMainWindow * window, SCM scm_guid)
|
||||
return;
|
||||
|
||||
guid = guid_malloc ();
|
||||
guid_str = scm_to_locale_string (scm_guid);
|
||||
guid_str = scm_to_utf8_string (scm_guid);
|
||||
if (!string_to_guid (guid_str, guid))
|
||||
goto cleanup;
|
||||
|
||||
|
@ -148,7 +148,7 @@ update_display_lists(gnc_column_view_edit * view)
|
||||
{
|
||||
if (scm_is_equal (SCM_CAR(rpt_guids), selection))
|
||||
row = i;
|
||||
name = gnc_scm_to_locale_string (scm_call_2(template_menu_name, SCM_CAR(rpt_guids),
|
||||
name = gnc_scm_to_utf8_string (scm_call_2(template_menu_name, SCM_CAR(rpt_guids),
|
||||
SCM_BOOL_F));
|
||||
|
||||
gtk_list_store_append(store, &iter);
|
||||
@ -195,7 +195,7 @@ update_display_lists(gnc_column_view_edit * view)
|
||||
|
||||
id = scm_to_int(SCM_CAAR(contents));
|
||||
this_report = gnc_report_find(id);
|
||||
name = gnc_scm_to_locale_string (scm_call_1(report_menu_name, this_report));
|
||||
name = gnc_scm_to_utf8_string (scm_call_1(report_menu_name, this_report));
|
||||
|
||||
gtk_list_store_append(store, &iter);
|
||||
gtk_list_store_set
|
||||
|
@ -241,8 +241,8 @@ gnc_style_sheet_new (StyleSheetDialog * ssd)
|
||||
if (template_str && name_str)
|
||||
{
|
||||
new_ss = scm_call_2(make_ss,
|
||||
scm_from_locale_string(template_str),
|
||||
scm_from_locale_string(name_str));
|
||||
scm_from_utf8_string(template_str),
|
||||
scm_from_utf8_string(name_str));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1349,7 +1349,7 @@ gnc_get_export_type_choice (SCM export_types)
|
||||
break;
|
||||
}
|
||||
|
||||
name = gnc_scm_to_locale_string (scm);
|
||||
name = gnc_scm_to_utf8_string (scm);
|
||||
choices = g_list_prepend (choices, name);
|
||||
}
|
||||
|
||||
@ -1398,7 +1398,7 @@ gnc_get_export_filename (SCM choice)
|
||||
if (choice == SCM_BOOL_T)
|
||||
type = g_strdup (html_type);
|
||||
else
|
||||
type = gnc_scm_to_locale_string(SCM_CAR (choice));
|
||||
type = gnc_scm_to_utf8_string(SCM_CAR (choice));
|
||||
|
||||
/* %s is the type of what is about to be saved, e.g. "HTML". */
|
||||
title = g_strdup_printf (_("Save %s To File"), type);
|
||||
|
@ -159,7 +159,7 @@ gnc_report_window_default_params_editor(SCM options, SCM report)
|
||||
{
|
||||
ptr = scm_call_1(get_template_name, ptr);
|
||||
if (scm_is_string(ptr))
|
||||
title = gnc_scm_to_locale_string (ptr);
|
||||
title = gnc_scm_to_utf8_string (ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ gnc_run_report (gint report_id, char ** data)
|
||||
if (scm_text == SCM_UNDEFINED || !scm_is_string (scm_text))
|
||||
return FALSE;
|
||||
|
||||
*data = gnc_scm_to_locale_string (scm_text);
|
||||
*data = gnc_scm_to_utf8_string (scm_text);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user