Next Previous Up Top Contents Index

18 The SYSTEM Package

*file-encoding-detection-algorithm*

Variable

Summary

List of functions to call to work out an encoding.
Package

system

Initial value

(FIND-FILENAME-PATTERN-ENCODING-MATCH 
 FIND-ENCODING-OPTION
 DETECT-ENCODING-IN-FILE
 DEFAULT-FILE-ENCODING)

Description

Functions on this list take four arguments--the pathname of the file; an external format spec; a vector of element-type(unsigned-byte 8) which contains the first bytes of the file; and a non-negative integer which is the maximum extent of buffer to be searched. This length argument is 0 in the case that the file does not exist, or the direction is:output. They return an external format spec, which normally is eitheref-spec unmodified, or the result of mergingef-spec with another external format spec viamerge-ef-specs.
Example

If you want to inspect the attribute line and then fall back to a default if not found set the variable to the following:
(FIND-ENCODING-OPTION DEFAULT-FILE-ENCODING)

See also

find-filename-pattern-encoding-match
find-encoding-option
detect-encoding-in-file
detect-japanese-encoding-in-file
default-file-encoding


LispWorks Reference Manual - 15 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker