[Top][All Lists]

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

Re: Character encoding again.

From: John Darrington
Subject: Re: Character encoding again.
Date: Sat, 6 Nov 2010 08:41:22 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Nov 04, 2010 at 10:12:15PM -0700, Ben Pfaff wrote:
     John Darrington <address@hidden> writes:
     > Has anyone got any sensible suggestions on how to implement the two 
     >  int get_codepage_from_encoding_name (const char*);  and
     >  const char *get_encoding_from_codepage (int);
     I'm appending an implementation.  What do you think?

The implementation per se looks good except that the 
extern declarations in sys-file-private.h should go
in sys-file-private.c I think.
     (It occurs to me that I might have the wrong idea for
     sys_get_encoding_from_codepage().  Maybe it should return a name
     for the encoding *on the local machine*, not on Windows.  Or
     maybe we need both functions.)

Perhaps you're right.   When writing a sysfile, the encoding must be
one that will be recognised by SPSS (that means Windows).  When reading
a sysfile, it should be one that is recognised by the local machine (in
other words by the installed iconv implementation).

Out of the 322 encodings in the table, only 138 are recognised by the iconv
on my machine.   We can't possible know in advance which encodings will be
recognised.  Even if we could, we couldn't be sure that every 2-permutation
of them will be convertable.    So the fallback problem remains.


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.

Attachment: signature.asc
Description: Digital signature

reply via email to

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