All Manuals > LispWorks® User Guide and Reference Manual > 47 The SYSTEM Package

detect-japanese-encoding-in-file Function

Summary

Determines which type of Japanese encoding is used in a buffer.

Package

system

Signature

detect-japanese-encoding-in-file pathname ef-spec buffer length => new-ef-spec

Arguments
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.
Values
new-ef-spec
A new external format spec created by merging ef-spec with the Japanese encoding that was found.
Description

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.

pathname is ignored.

See also

*file-encoding-detection-algorithm*


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:31:02