For \simeq, TeX generates /similarequal instead of Adobe's
/asymptoticallyequal; so similarequal needs to be supported too.
In TeX Live 2023:
texmf-dist/fonts/map/glyphlist/glyphlist.txt (Adobe Glyph List) contains
asymptoticallyequal;2243
but texmf-dist/fonts/map/glyphlist/texglyphlist.txt (Extensions to the
Adobe Glyph List for TeX fonts and encodings) contains
similarequal;2243
As a consequence, texmf-dist/tex/generic/pdftex/glyphtounicode.tex
contains both
\pdfglyphtounicode{asymptoticallyequal}{2243}
\pdfglyphtounicode{similarequal}{2243}
NameToUnicodeTable.h already has
{ 0x2243, "asymptoticallyequal" }
so one just needs to add the missing
{ 0x2243, "similarequal" }
To reproduce the issue, consider the following simeq.tex file:
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
\thispagestyle{empty}
$\simeq\approx$
\end{document}
In the PDF file generated by pdflatex, after uncompressing it with
"qpdf --stream-data=uncompress":
/F32 9.9626 Tf 148.712 707.125 Td [('\031)]TJ
and
dup 25 /approxequal put
dup 39 /similarequal put
i.e. /similarequal is generated for \simeq, and pdftotext gives
'≈
(the apostrophe ', code 39, corresponds to /similarequal, but appears
as an apostrophe since /similarequal is not supported; and \031, i.e.
25 in decimal, corresponds to /approxequal, which appears correctly
because /approxequal is supported).
With the attached patch, pdftotext gives
≃≈
as wanted.
I've created a merge request upstream.