Wikidata:Property proposal/type code

From Wikidata
Jump to navigation Jump to search

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")
Planned useUse it in infoboxes
Expected completenesseventually complete (Q21873974)
See alsomedia type (P1163)


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


  • Symbol support vote.svg Support David (talk) 04:56, 12 July 2019 (UTC)
  • Symbol support vote.svg Support --DannyS712 (talk) 12:30, 12 July 2019 (UTC)
  • could you add "Mac OS" or something similar to the label? Otherwise people are likely not to use it correctly. --- Jura 16:30, 12 July 2019 (UTC)
  • Symbol support vote.svg Support - Premeditated (talk) 18:19, 13 July 2019 (UTC)
  • It is not clear to me from the examples what the values should really be. What do we do with the bracketed parts? Marking as not ready because of that. − Pintoch (talk) 21:21, 23 July 2019 (UTC)
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)
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 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)
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)

@ديفيد عادل وهبة خليل 2, ArthurPSmith, Tinker Bell, DannyS712, Premeditated, Jura1: ✓ Done: Mac OS type code (P7126). − Pintoch (talk) 08:59, 1 August 2019 (UTC)

  • Now that I think about it, shouldn't we have made this with external-id? --- Jura 09:04, 1 August 2019 (UTC)
    • Jura, no, there is not an online index for these identifiers. --Tinker Bell 02:07, 2 August 2019 (UTC)
      • @Tinker Bell: The question is if it's stable and unique. There is no requirement for an official online list with a separate page for each value. --- Jura 17:44, 2 August 2019 (UTC)

@ديفيد عادل وهبة خليل 2, ArthurPSmith, Tinker Bell, DannyS712, Premeditated, Pintoch: are you ok with a change of datatype or is there some other point to take in account? --- Jura 08:12, 4 August 2019 (UTC)

No problem with changing the datatype --DannyS712 (talk) 08:55, 4 August 2019 (UTC)
I don't see any advantage to changing the datatype, and I'm not sure this case actually meets the requirements as an identifier - is there really a one-to-one relationship here? ArthurPSmith (talk) 13:00, 4 August 2019 (UTC)
In particular, given there are at least 2 different representations for most of these codes, and no "identifier standard" for them, I'd be inclined to Symbol oppose vote.svg Oppose changing the datatype. ArthurPSmith (talk) 13:01, 4 August 2019 (UTC)
How would this make them non-unique or instable? --- Jura 13:04, 4 August 2019 (UTC)
I agree with ArthurPSmith. Many filetypes can have the same type code. --Tinker Bell 19:23, 4 August 2019 (UTC)