Yes, good thinking there. More guessing:
The string may have 'non-printable' characters, it may have been copied and pasted from an editor that contains the characters (that are not visible but are actually there. Something like this kept me awake one night).
This may also be Unicode related. Did some googling, found a good example here: https://www.soscisurvey.de/tools/view-chars.php