Here is another annoying and common programming-related problem: content type detection. The commonly applied solutions are:
file(1)
or libmagic(3)
)
Of course there are related controversies and implementation inconsistencies, and one has to decide what to apply on case-by-case basis.
It could have been mostly solved if each chunk of shared data had a MIME type associated with it right from the moment of authoring (akin to magic numbers, but with no/low likelihood of collisions), maybe via a single-line header only containing that type, yet apparently it's not realistic at all, judging by adoption and support of all the other standards. Would surely be controversial, too. As well as a less radical approach of using media types as filename extensions.
As usual, one can try to set a system like that locally (for oneself), which would take some time and effort, without much of benefit. But in general, reliably picking software for data/file processing (including viewing or editing by a user) is an unsolved problem, which is not likely to get solved in the observable future, and which is particularly annoying because it can be so simple. Though it's not alone in that.