Microsoft Code Page Translation file (.cpx)
.cpx file signature | application/octet-stream
Microsoft Code Page Translation file
Magic Bytes
Offset 0
5B 57 69 6E 64 6F 77 73 20 4C 61 74 69 6E 20
Sources: Gary Kessler
Extension
.cpx
MIME Type
application/octet-stream
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .cpx files in Python
def is_cpx(file_path: str) -> bool:
"""Check if file is a valid CPX by magic bytes."""
signature = bytes([0x5B, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x4C, 0x61, 0x74, 0x69, 0x6E, 0x20])
with open(file_path, "rb") as f:
return f.read(15) == signature
How to validate .cpx files in Node.js
function isCPX(buffer: Buffer): boolean {
const signature = Buffer.from([0x5B, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x4C, 0x61, 0x74, 0x69, 0x6E, 0x20]);
return buffer.subarray(0, 15).equals(signature);
}
How to validate .cpx files in Go
func IsCPX(data []byte) bool {
signature := []byte{0x5B, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x4C, 0x61, 0x74, 0x69, 0x6E, 0x20}
if len(data) < 15 {
return false
}
return bytes.Equal(data[:15], signature)
}
API Endpoint
/api/v1/cpx
curl https://filesignature.org/api/v1/cpx
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .cpx file?
A .cpx file is a Microsoft Code Page Translation file file. Microsoft Code Page Translation file
What are the magic bytes for .cpx files?
The magic bytes for Microsoft Code Page Translation file files are 5B 57 69 6E 64 6F 77 73 20 4C 61 74 69 6E 20 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .cpx file?
To validate a .cpx file, read the first bytes of the file and compare them against the known magic bytes (5B 57 69 6E 64 6F 77 73 20 4C 61 74 69 6E 20) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .cpx files?
There is no officially registered MIME type for .cpx files. Systems typically use application/octet-stream as a generic fallback when handling this format.
Is it safe to open .cpx files?
Microsoft Code Page Translation file (.cpx) 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.