Wikidata:Property proposal/type code

Mac OS type code edit

Originally proposed at Wikidata:Property proposal/Generic

Descriptioncode used formerly by Mac OS to identify file types and programs
RepresentsType code (Q9090749)
Data typeString
Template parameterTemplate:Infobox file format (Q10986167)@es "type code"
Domainfile format (Q235557), software (Q7397)
Allowed valueshexadecimal (Q82828)
Example 1Photoshop File Format (Q2141903) → "38 42 49 4d" ("8BIM")
Example 2OpenType Font (Q260180) → "73 66 6e 74" ("sfnt")
Example 3AutoCAD (Q83570) → "41 43 41 44" ("ACAD")
Sourcehttps://www.macdisk.com/macsigen.php
Planned useUse it in infoboxes
Expected completenesseventually complete (Q21873974)
See alsomedia type (P1163)

Motivación edit

(Indica tu motivación para solicitar esta propiedad aquí). --Tinker Bell 23:16, 11 July 2019 (UTC)[reply]

Discussion edit

The text in the brackets are the signature of where the block starts. Example: For a PSD file, we look for the byte sequence 38 42 50 53 or the ASCII sequence of 8BPS (signature). - Premeditated (talk) 08:25, 24 July 2019 (UTC)[reply]
Pintoch, Premeditated: I wrote the two representations, because I don't know how to store these values. Although many codes can be represented as ASCII, some codes can't be represented as ASCII, because they have non-printable characters. I don't know if Wikidata could store the code as hexadecimal, and show the value as ASCII too. The explain at macdisk.com says:
Signatures are often considered as strings, and the greatest part of information published on signatures is based on this assumption.
However, signatures are handled by programs as 32-bit integers, which means that when you see a filetype coded as 'TEXT', a program will see 0x54455854, or even 0x54584554, depending on whether it is big-endian or little-endian.
This is the explanation of the possible presence of spaces (very frequent) or even of cryptic characters, even of non-printable characters, in the signatures.
--Tinker Bell 18:27, 30 July 2019 (UTC)[reply]
I marked this proposal as ready. I think it's fine to add either way or in both formats, and use encoding (P3294) as a qualifier to specify the representation. ArthurPSmith (talk) 20:21, 31 July 2019 (UTC)[reply]