Looks for the Unicode Byte Order Mark, which if found is assumed to indicate a Unicode UCS-2 encoded file.
Pathname identifying location of buffer .
An external format spec.
A buffer whose contents are examined.
Length (an integer) up to which buffer should be examined.
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)
.