SYSFILE INFO: Add ENCODING subcommand.
[pspp] / doc / files.texi
index 375a9529c3b39e828a7b7ed330e1afe895686294..318c887265eb83df35ed85437ff4db5564b3603b 100644 (file)
@@ -176,9 +176,9 @@ file on disk.  Only the active dataset read from the file
 is affected by these subcommands.
 
 @pspp{} tries to automatically detect the encoding of string data in the
-file.  Sometimes, however, this does not work well encoding,
+file.  Sometimes, however, this does not work well,
 especially for files written by old versions of SPSS or @pspp{}.  Specify
-the @subcmd{ENCODING} subcommand with an IANA character set name as its string
+the @subcmd{ENCODING} subcommand with an @acronym{IANA} character set name as its string
 argument to override the default.  The @subcmd{ENCODING} subcommand is a @pspp{}
 extension.
 
@@ -211,7 +211,7 @@ specified.  It determines the type of the file or source to read.
 Spreadsheet files created by Gnumeric (@url{http://gnumeric.org}).
 
 @item ODS
-Spreadsheet files in OpenDocument format.
+Spreadsheet files in OpenDocument format (@url{http://opendocumentformat.org}).
 
 @item PSQL
 Relations from PostgreSQL databases (@url{http://postgresql.org}).
@@ -366,6 +366,7 @@ GET DATA /TYPE=PSQL
 @display
 GET DATA /TYPE=TXT
         /FILE=@{'@var{file_name}',@var{file_handle}@}
+        [ENCODING='@var{encoding}']
         [/ARRANGEMENT=@{DELIMITED,FIXED@}]
         [/FIRSTCASE=@{@var{first_case}@}]
         [/IMPORTCASE=@{ALL,FIRST @var{max_cases},PERCENT @var{percent}@}]
@@ -381,6 +382,10 @@ The @subcmd{FILE} subcommand is mandatory.  Specify the file to be read as
 a string file name or (for textual data only) a
 file handle (@pxref{File Handles}).
 
+The @subcmd{ENCODING} subcommand specifies the character encoding of
+the file to be read.  @xref{INSERT}, for information on supported
+encodings.
+
 The @subcmd{ARRANGEMENT} subcommand determines the file's basic format.
 DELIMITED, the default setting, specifies that fields in the input
 data are separated by spaces, tabs, or other user-specified
@@ -679,7 +684,7 @@ Use of @cmd{IMPORT} to read a system file is a @pspp{} extension.
 SAVE
         /OUTFILE=@{'@var{file_name}',@var{file_handle}@}
         /UNSELECTED=@{RETAIN,DELETE@}
-        /@{COMPRESSED,UNCOMPRESSED@}
+        /@{UNCOMPRESSED,COMPRESSED,ZCOMPRESSED@}
         /PERMISSIONS=@{WRITEABLE,READONLY@}
         /DROP=@var{var_list}
         /KEEP=@var{var_list}
@@ -701,9 +706,32 @@ By default, cases excluded with FILTER are written to the system file.
 These can be excluded by specifying @subcmd{DELETE} on the @subcmd{UNSELECTED}
 subcommand.  Specifying @subcmd{RETAIN} makes the default explicit.
 
-The @subcmd{COMPRESS} and @subcmd{UNCOMPRESS} subcommand determine whether
-the saved system file is compressed.  By default, system files are compressed.
-This default can be changed with the SET command (@pxref{SET}).
+The @subcmd{UNCOMPRESSED}, @subcmd{COMPRESSED}, and
+@subcmd{ZCOMPRESSED} subcommand determine the system file's
+compression level:
+
+@table @code
+@item UNCOMPRESSED
+Data is not compressed.  Each numeric value uses 8 bytes of disk
+space.  Each string value uses one byte per column width, rounded up
+to a multiple of 8 bytes.
+
+@item COMPRESSED
+Data is compressed with a simple algorithm.  Each integer numeric
+value between @minus{}99 and 151, inclusive, or system missing value
+uses one byte of disk space.  Each 8-byte segment of a string that
+consists only of spaces uses 1 byte.  Any other numeric value or
+8-byte string segment uses 9 bytes of disk space.
+
+@item ZCOMPRESSED
+Data is compressed with the ``deflate'' compression algorithm
+specified in RFC@tie{}1951 (the same algorithm used by
+@command{gzip}).  Files written with this compression level cannot be
+read by PSPP 0.8.1 or earlier or by SPSS 20 or earlier.
+@end table
+
+@subcmd{COMPRESSED} is the default compression level.  The SET command
+(@pxref{SET}) can change this default.
 
 The @subcmd{PERMISSIONS} subcommand specifies permissions for the new system
 file.  WRITEABLE, the default, creates the file with read and write
@@ -874,7 +902,7 @@ decimal point character set with SET DECIMAL (@pxref{SET DECIMAL}).
 
 The TEXTOPTIONS QUALIFIER setting specifies a character that is output
 before and after a value that contains the delimiter character or the
-qualifier character.  The default is a double quote (@samp{@@}).  A
+qualifier character.  The default is a double quote (@samp{"}).  A
 qualifier character that appears within a value is doubled.
 
 @node SYSFILE INFO
@@ -882,7 +910,7 @@ qualifier character that appears within a value is doubled.
 @vindex SYSFILE INFO
 
 @display 
-SYSFILE INFO FILE='@var{file_name}'.
+SYSFILE INFO FILE='@var{file_name}' [ENCODING='@var{encoding}'].
 @end display
 
 @cmd{SYSFILE INFO} reads the dictionary in a system file and
@@ -891,6 +919,13 @@ displays the information in its dictionary.
 Specify a file name or file handle.  @cmd{SYSFILE INFO} reads that file as
 a system file and displays information on its dictionary.
 
+@pspp{} tries to automatically detect the encoding of string data in
+the file.  Sometimes, however, this does not work well, especially for
+files written by old versions of SPSS or @pspp{}.  Specify the
+@subcmd{ENCODING} subcommand with an @acronym{IANA} character set name
+as its string argument to override the default.  The @subcmd{ENCODING}
+subcommand is a @pspp{} extension.
+
 @cmd{SYSFILE INFO} does not affect the current active dataset.
 
 @node XEXPORT
@@ -933,7 +968,7 @@ the data is read by a procedure or procedure-like command.
 @display
 XSAVE
         /OUTFILE='@var{file_name}'
-        /@{COMPRESSED,UNCOMPRESSED@}
+        /@{UNCOMPRESSED,COMPRESSED,ZCOMPRESSED@}
         /PERMISSIONS=@{WRITEABLE,READONLY@}
         /DROP=@var{var_list}
         /KEEP=@var{var_list}