Windows international code page (.cpi)
.cpi file signature | application/octet-stream
Windows international code page
Magic Bytes
Offset 0
53 49 45 54 52 4F 4E 49 43 53 20 58 52 44 20 53 43 41 4E
Sources: Gary Kessler
All Known Signatures
2 signature variants are documented for .cpi files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 53 49 45 54 52 4F 4E 49 43 53 20 58 52 44 20 53 43 41 4E | 0 | Gary Kessler |
| FF 46 4F 4E 54 | 0 | Gary Kessler |
Extension
.cpi
MIME Type
application/octet-stream
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .cpi files in Python
def is_cpi(file_path: str) -> bool:
"""Check if file is a valid CPI by magic bytes."""
signature = bytes([0x53, 0x49, 0x45, 0x54, 0x52, 0x4F, 0x4E, 0x49, 0x43, 0x53, 0x20, 0x58, 0x52, 0x44, 0x20, 0x53, 0x43, 0x41, 0x4E])
with open(file_path, "rb") as f:
return f.read(19) == signature
How to validate .cpi files in Node.js
function isCPI(buffer: Buffer): boolean {
const signature = Buffer.from([0x53, 0x49, 0x45, 0x54, 0x52, 0x4F, 0x4E, 0x49, 0x43, 0x53, 0x20, 0x58, 0x52, 0x44, 0x20, 0x53, 0x43, 0x41, 0x4E]);
return buffer.subarray(0, 19).equals(signature);
}
How to validate .cpi files in Go
func IsCPI(data []byte) bool {
signature := []byte{0x53, 0x49, 0x45, 0x54, 0x52, 0x4F, 0x4E, 0x49, 0x43, 0x53, 0x20, 0x58, 0x52, 0x44, 0x20, 0x53, 0x43, 0x41, 0x4E}
if len(data) < 19 {
return false
}
return bytes.Equal(data[:19], signature)
}
API Endpoint
/api/v1/cpi
curl https://filesignature.org/api/v1/cpi
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .cpi file?
A .cpi file is a Windows international code page file. Windows international code page
What are the magic bytes for .cpi files?
The magic bytes for Windows international code page files are 53 49 45 54 52 4F 4E 49 43 53 20 58 52 44 20 53 43 41 4E at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .cpi file?
To validate a .cpi file, read the first bytes of the file and compare them against the known magic bytes (53 49 45 54 52 4F 4E 49 43 53 20 58 52 44 20 53 43 41 4E) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .cpi files?
There is no officially registered MIME type for .cpi files. Systems typically use application/octet-stream as a generic fallback when handling this format.
Is it safe to open .cpi files?
Windows international code page (.cpi) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.