Looks for the Unicode Byte Order Mark, which if found is assumed to indicate a Unicode UCS-2 encoded file.
pathname ef-spec buffer length
Pathname identifying location of
An external format spec.
A buffer whose contents are examined.
Length (an integer) up to which
should be examined.
A new external format spec created by merging
with the encoding that was found.
When called as part of open's encoding detection routine, if byte pair FE FF is found at the start of the file, it is assumed to be UTF16-BE encoded. This encoding is represented by the ef-spec
(:unicode :little-endian nil)
If byte pair FF FE is found at the start of the file, it is assumed to be UTF16-LE encoded. This encoding is represented by the ef-spec
(:unicode :little-endian t)
LispWorks User Guide and Reference Manual - 22 Dec 2009