Multipurpose Internet Mail Extensions was originally be developed for e-mails but became a standard for all kinds of applications (see https://en.wikipedia.org/wiki/MIME). The problem to be solved is to mark and identify in a single data stream individual files (parts) Content-Type. The data stream contains : the marking, identification and the data to be transmitted. Typically in emails there is text and some attachments. Additionally it defines a set of transfer encodings which can be used to represent 8-bit binary data using characters from the 7-bit ASCII character set content-transfer-encoding.
Names and values in MIME headers can be encoded:
Subject: =?utf-8?Q?=C2=A1Hola,_se=C3=B1or!?=
is interpreted as
"Subject: ¡Hola, señor!"
Example:
Content-type: multipart/mixed; boundary="frontier"
MIME-version: 1.0
This is a multi-part message in MIME format.
--frontier
Content-type: text/plain
This is the body of the message.
--frontier
Content-type: text/html; encoding=UTF-8
Content-transfer-encoding: base64
PGh0bWw+CiAgPGhlYWQ+CiAgPC9oZWFkPgogIDxib2R5PgogICAgPHA+VGhpcyBpcyB0aGUg
Ym9keSBvZiB0aGUgbWVzc2FnZS48L3A+CiAgPC9ib2R5Pgo8L2h0bWw+Cg==
--frontier--
Mime links applications to type of data. This is not done once per computer, it is done more per software family:
Default
For KDE applications
For Gnome applications environment.
If no file extension is present the program file tries to find out its content.