Here's the official description of the characters in that range:
http://www.unicode.org/charts/PDF/U0080.pdf. As you can see, some of them are valid, some are valid and invisible (control characters), and only a couple are invalid (don't have any official description).
Now when you say you want to write them to a "text file", exactly what do you mean? A "text file" is one which contains text, so it doesn't make any sense to write data into it which isn't text. And when you write text to a file, that requires converting the (16-bit) chars to 8-bit bytes. This is done by using one of the available encodings. Usually encodings convert characters which they can't deal with -- such as your "invalid invisible" characters -- to question marks, on the ground that they aren't text.
So there really doesn't seem to be any point in what you are trying to do. If you have a program which expects to work with text, then using non-text characters is a pointless sort of test. On the other hand if you aren't really processing text, but some binary format instead, then
you should just work with bytes in your code instead of with characters.