variable: Make var_set_label() use the variable's own encoding.
[pspp-builds.git] / src / ui / gui / psppire-var-store.c
index 2a915afe149d6288a8af80c2ff201712ee63058a..e41b49223979e601e366982afad38dd5faf180be 100644 (file)
@@ -588,8 +588,7 @@ psppire_var_store_set_string (PsppireSheetModel *model,
       break;
     case PSPPIRE_VAR_STORE_COL_LABEL:
       {
-       var_set_label (pv, text,
-                       psppire_dict_encoding (var_store->dictionary), true);
+       var_set_label (pv, text, true);
        return TRUE;
       }
       break;
@@ -753,7 +752,8 @@ text_for_column (PsppireVarStore *vs,
            {
              gchar *const vstr = value_to_text (vl->value, dict, *write_spec);
 
-             return g_strdup_printf (_("{%s,`%s'}_"), vstr, val_lab_get_label (vl));
+             return g_strdup_printf (_("{%s,`%s'}_"), vstr,
+                                      val_lab_get_escaped_label (vl));
            }
          }
       }