projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
806a46b
)
Allow perl module to enter non-ascii data
author
John Darrington
<john@darrington.wattle.id.au>
Tue, 26 Oct 2010 15:11:04 +0000
(17:11 +0200)
committer
John Darrington
<john@darrington.wattle.id.au>
Tue, 26 Oct 2010 15:11:04 +0000
(17:11 +0200)
perl-module/PSPP.xs
patch
|
blob
|
history
diff --git
a/perl-module/PSPP.xs
b/perl-module/PSPP.xs
index 400aeda7b12ce45ada26c7dc138d8b5bf0224f4a..a95ccf63aef6336c070af3e09fe587076a15eb2d 100644
(file)
--- a/
perl-module/PSPP.xs
+++ b/
perl-module/PSPP.xs
@@
-34,6
+34,7
@@
#include "minmax.h"
#include <libpspp/message.h>
#include <libpspp/version.h>
#include "minmax.h"
#include <libpspp/message.h>
#include <libpspp/version.h>
+#include <libpspp/i18n.h>
#include <gl/xalloc.h>
#include <data/dictionary.h>
#include <data/case.h>
#include <gl/xalloc.h>
#include <data/dictionary.h>
#include <data/case.h>
@@
-591,7
+592,7
@@
CODE:
struct file_handle *fh =
fh_create_file (NULL, name, fh_default_properties () );
struct sysfile_info *sfi = xmalloc (sizeof (*sfi));
struct file_handle *fh =
fh_create_file (NULL, name, fh_default_properties () );
struct sysfile_info *sfi = xmalloc (sizeof (*sfi));
- dict_set_encoding (dict,
"UTF-8"
);
+ dict_set_encoding (dict,
UTF8
);
sfi->writer = sfm_open_writer (fh, dict, opts);
sfi->dict = dict;
sfi->opened = true;
sfi->writer = sfm_open_writer (fh, dict, opts);
sfi->dict = dict;
sfi->opened = true;
@@
-659,7
+660,7
@@
CODE:
char *error;
bool ok;
char *error;
bool ok;
- error = data_in (ss,
LEGACY_NATIVE
, ifmt->type,
+ error = data_in (ss,
SvUTF8(sv) ? UTF8: "iso-8859-1"
, ifmt->type,
case_data_rw (c, v), var_get_width (v),
dict_get_encoding (sfi->dict));
ok = error == NULL;
case_data_rw (c, v), var_get_width (v),
dict_get_encoding (sfi->dict));
ok = error == NULL;