On the same machine where I Built QT 6.2.2 for MacOS I opened SSH session and set the locale:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
checked the locale has been set correctly:
locale
it printed the following:
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"