Finds the encoding of a file based on the filename.
system
find-filename-pattern-encoding-match pathname ef-spec buffer length => new-ef-spec
pathname⇩ |
Pathname identifying location of buffer. |
ef-spec⇩ |
An external format spec. |
buffer⇩ |
A buffer whose contents are examined. |
length⇩ |
Length (an integer) up to which buffer should be examined. |
new-ef-spec⇩ |
An external format spec. |
The function find-filename-pattern-encoding-match
compares pathname (using pathname-match-p) with elements of *filename-pattern-encoding-matches*.
If a match is found, merges ef-spec with the corresponding external format spec and returns the result as new-ef-spec. Thus it does not override a supplied ef-spec.
buffer and length are ignored.
*file-encoding-detection-algorithm*
*filename-pattern-encoding-matches*
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:31:02