I guess my concern was that the UTF-8 code would be a multibyte code, where one of those bytes is a space. So we'd improperly detect a space when really it was a valid visible UTF-8 character. But since what we're detecting is all spaces, that would require both bytes to be valid ASCII spaces, and the name to be a single multi-byte character in length. Which seems pretty rare.
I guess my concern was that the UTF-8 code would be a multibyte code, where one of those bytes is a space. So we'd improperly detect a space when really it was a valid visible UTF-8 character. But since what we're detecting is all spaces, that would require both bytes to be valid ASCII spaces, and the name to be a single multi-byte character in length. Which seems pretty rare.