v.22.6Bug Fix

Fix logical error in normalizeUTF8 functions

Fix logical error in normalizeUTF8 functions. Closes #37298. #37443 (Maksim Kita).