I have created two test documents. Here's foo.tex:
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
Gödel
\end{document}
And here's foo2.tex:
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
G\"odel
\end{document}
They were both compiled with pdflatex. The resulting PDFs look the same and "feel" the same: In both, SumatraPDF will find the search string "Gödel". In both, I can copy the word and paste it into a text editor. If I type "Gödel" into the search box of Windows, it finds both PDFs.
However, if I compare the PDFs with diff, it turns out they are not identical. What is the difference? Is there a reason to prefer one version over the other?
EDIT:
I was asked to clarify the question. My concern was not whether the files looked the same, so the old question about comparing the visual appearance of two PDFs didn't really help. My concern was whether the files behaved in the same way, e.g. if the ö would really be identified as umlaut-o by search engines and so on. I was wondering whether \"o would insert a "real character" or whether it would rather compose something out of different glyphs.
luainputencpackage if you're not going to use Lua(La)TeX to compile the documents? – Mico Mar 12 '21 at 14:25luainputencline, the body of the two documents should be the same. – Davislor Mar 12 '21 at 14:41diff. I guessdiffis comparing also metadata like creation time, which of course will differ. – campa Mar 12 '21 at 14:41