Hello,
I am attempting to use PSPP and the PSPP::Perl module to write labels and data
that contain non-ASCII characters. Below is a simple test script that includes
Chinese characters (encoded as UTF-8) in the value labels. The file is created
without errors, but when I open it, either in psppire or SPSS version 18, the
labels appear as garbled text. I am using the latest development version
0.7.2. Should this be working correctly? Is anyone else having success
writing utf-8 via the PSPP::Perl module? Thanks,
Rob
use PSPP;
my $dict = PSPP::Dict->new ();
my $var1 = PSPP::Var->new ($dict, "Q1", (fmt=>PSPP::Fmt::F, width=>2,
decimals=>0) );
$var1->add_value_label (0, q|航空和国防|);
$var1->add_value_label (1, q|无线通讯|);
my $sysfile = PSPP::Sysfile->new ('testfile.sav', $dict);
$sysfile->close();
_______________________________________________
Pspp-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-users