Revert "Fixed #19508 -- Repercented non utf-8."

This reverts commit f690ab7708cac7825bc151c1c1cdc831c2273b33.
Revert "Revert "Fixed #19508 -- Repercented non utf-8.""

This reverts commit 90ae4cd4499e0b040b0ad6a085ee3a4a68b99dbc.