[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PSPP::Perl and utf-8 characters

From: John Darrington
Subject: Re: PSPP::Perl and utf-8 characters
Date: Thu, 3 Dec 2009 18:33:38 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

Are you sure that what you're putting in is valide UTF-8 ?  I suspect that it 

I'm attaching a simple test file, based on your test, which writes some UTF-8 
The first label is ascii.  The second and third contain european characters, 
the fourth
contains a couple of chinese characters that I copied from some chinese web 

Running this perl fragment produces a .sav file which the latest master version 


On Mon, Nov 30, 2009 at 10:23:32PM -0800, Rob Messer wrote:
     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,
     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);
     Pspp-users mailing list

PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See or any PGP keyserver for public key.

Description: Text Data

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]