For the test case:
\documentclass{article}
\usepackage{ifxetex}
\ifxetex
\usepackage{polyglossia}
\setdefaultlanguage{english}
\defaultfontfeatures{Ligatures={TeX}}
\setmainfont[BoldFont=cmunbx.otf, ItalicFont=cmunti.otf, BoldItalicFont=cmunbi.otf]{cmunrm.otf}
\setsansfont{CMU Sans Serif}
\setmonofont{CMU Typewriter Text}
\else
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[utf8]{inputenc}
\fi
\begin{document}
\section{Main}
Euro (€): ^^e2^^82^^ac\par
Heavy Check Mark (U+2714): ^^e2^^9c^^94\par
% ✔
\end{document}
got error:
Unicode character ✔ (U+2714) not set up for use with LaTeX. Heavy Check Mark (U+2714): ^^e2^^9c^^94
while building with PDFLaTeX.
There are lot of similar issues here, but even solution from the closest one (Unicode characters in pdflatex output using hexcode without UTF-8 input) didn't work. How to fix it?
No such error while building with XeLaTeX (though it draws characters incorrectly, so suggestions how to fix it are also appreciated).


^^e2^^82^^acform will never work in xetex so you can remove the xetex testing in the preamble as that branch can not work. (or keep the xetex branch and delete these^^forms) – David Carlisle Dec 17 '21 at 22:05