#include <stdlib.h>
#include <string.h>
-#if HAVE_LANGINFO_H
-#include <langinfo.h>
-#endif
#include <data/value.h>
#include <gtksheet/gsheet-hetero-column.h>
#include <gtksheet/gsheet-uniform-row.h>
+#include "localcharset.h"
#include "psppire-var-store.h"
#include "helper.h"
#include "psppire-dict.h"
if ( row >= psppire_var_store_get_var_cnt (var_store))
return TRUE;
- xml = glade_xml_new (PKGDATADIR "/data-editor.glade", NULL, NULL);
+ xml = XML_NEW ("data-editor.glade");
gtk_sheet_get_attributes (sheet, row, column, &attributes);
gtk_sheet_set_model (GTK_SHEET (sheet), G_SHEET_MODEL (the_var_store));
-#if HAVE_LANGINFO_H
/* Since this happens inside glade_xml_new, we must prevent strings from
* being re-encoded twice */
codeset = bind_textdomain_codeset (PACKAGE, 0);
- bind_textdomain_codeset (PACKAGE, nl_langinfo (CODESET));
-#endif
+ bind_textdomain_codeset (PACKAGE, locale_charset ());
+
for (i = 0 ; i < n_COLS ; ++i )
{
g_sheet_hetero_column_set_button_label (G_SHEET_HETERO_COLUMN (geo), i,
g_sheet_hetero_column_set_width (G_SHEET_HETERO_COLUMN (geo), i,
column_def[i].width);
}
-#if HAVE_LANGINFO_H
+
bind_textdomain_codeset (PACKAGE, codeset);
-#endif
gtk_widget_show (sheet);