Working with files › From the window to the file · 6 min read
From the extension picking the interpreter come three consequences you use every day. Two are useful and one breaks things.
One: renaming the extension changes the interpreter, not the contents.
That is exactly the .docx to .zip trick. You transform nothing, you just ask
a different program to look at it.
Two, and this is the one that breaks things: putting .pdf on a photo does not
turn it into a PDF.
The label lies, the PDF reader opens it expecting a PDF, does not find what it expects, and throws a strange error.
Converting is not renaming. Converting means generating a new file with different bits inside.
Three: since the extension gives the orders, it helps to see it.
Windows hides them by default, which is why a lot of people live with files whose type they cannot see.
In File Explorer: View → Show → File name extensions (on Windows 10, the View tab and the checkbox of the same name). Turn it on today and never turn it off.
A fact that surprises people. .docx, .xlsx and .pptx are, inside, a
.zip with text files in it. Literally: rename a .docx to .zip, open it with
your usual unzipper, and there is the text.
But from the outside they behave like binaries: you cannot read them at a glance or compare two versions. For every practical purpose they count as binary.
You have a photo and rename it from photo.jpg to photo.pdf. What happens?
Converting means generating a new file with different bits inside.
snack 7 of 9 · Which format to ask for
Powered by KlugerByte