How can I be sure of the file encoding?
$ file –mime my.txt my.txt: text/plain; charset=iso-8859-1
$ file –mime my.txt my.txt: text/plain; charset=iso-8859-1
Using Unicode, there is more than one valid way to represent the same letter. The characters you’re using in your Tricky Name are a “latin small letter i with circumflex” and a “latin small letter a with ring above”. You say “Note the %CC versus %C3 character representations”, but looking closer what you see are … Read more
As someone pointed that out already, calling without the encoding argument does the trick. However, if you want to be explicit, try this: using (var sw = new StreamWriter(this.Stream, new UTF8Encoding(false))) To disable BOM, the key is to construct with a new UTF8Encoding(false), instead of just Encoding.UTF8Encoding. This is the same as calling StreamWriter without … Read more