Avoid creating a QChar, which represents an UTF-16 code-unit, and work directly with char32_t's. (cherry picked from commit 19dc9a1d)