Helix Core Server file type detection and Unicode
In both Unicode mode and non-Unicode mode, if you do not assign a file
type when you add a file to the depot,
Helix Core Server
(by default) attempts to detect file type by scanning the first 65536
characters of the file. If non-printable characters are detected, the
file is assigned the binary
file type. (In Unicode mode, a
further check is performed: if there are no non-printable characters, and
there are high-ASCII characters that are translatable using the character
set specified by P4CHARSET
, the file is assigned the
unicode
file type.)
Finally (for services running in Unicode mode or non-Unicode mode), if a
UTF-16 BOM is present, the file is assigned the utf16
file
type. Otherwise, the file is assigned the text
file type.
(In Unicode mode, a further check is performed: files with high-ASCII
characters that are undefined in the character set specified by
P4CHARSET
are assigned the binary
file
type.)
In most cases, there is no need to override
Helix Core Server’s default
file type detection. If you must override
Helix Core Server’s default
file type detection, you can assign
Helix Core Server
file types according to a file’s extension, by issuing the p4
typemap
command. For more about using the typemap feature,
refer to the
Helix Core Server Administrator Guide, and
the
Helix Core Command-Line (P4) Reference.