I'm getting this exact error message (including linebreaks)
! ^^^^ needs four hex digits.
l.5 \newcommand{\boldpsi}{^
^^^^1d6d9}
for this piece of code:
\documentclass{article}
\usepackage{amsmath}
\usepackage{unicode-math}
\setmathfont{texgyrepagella-math.otf}
\newcommand{\boldpsi}{^^^^^1d6d9}
\begin{document}
$\boldpsi$
\end{document}
I checked this answer but 5 carets seem the way to go.
^, so use^^^^^^01d6d9. – Ulrike Fischer Apr 26 '22 at 08:05