I am writing a program that behaves differently depends on whether the input string is valid UTF-8. I can test the "valid UTF-8" but can't do the "invalid UTF-8" branch for obvious reason.
I tried to googled them, but the results are not helpful at all.