fix: #3580767 use UTF-8 safe string functions

(cherry picked from commit 20c8ac18)

Closes #3581811

Merge request reports

Loading