John242424 wrote:
When I changed encoding to Unicode, these chars are gone.
Be aware that Unicode also uses prefix characters (0xFF 0xFE) to identify the encoding. In either case (UTF-8 or Unicode) if you are reading/writing with the correct C#/.NET classes you don't need to worry about this as the framework will manage it correctly for you. If you are writing your own reader/writer then make sure you manage the encoding keys correctly.