Determines which type of Japanese encoding is used in a buffer.
system
detect-japanese-encoding-in-file 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 |
A new external format spec created by merging ef-spec with the Japanese encoding that was found. |
The function detect-japanese-encoding-in-file assumes the encoding is one of :jis, :sjis, :euc, :unicode and :ascii, and tries to determine which of these it is, by looking for distinctive byte sequences in buffer up to length. If found, merge ef-spec with that encoding.
LispWorks® User Guide and Reference Manual - 18 Feb 2025 15:32:47