Oh,

When you said BOM I thought you were just saying the command would bomb! I didn't know it was an acronym! Thanks for explaining it to me.

Jim

Quote Originally Posted by Inferrd View Post
Because 'System.Text.Encoding.UTF8' is a version of the UTF-8 encoding that happens to emit a BOM (Byte Order Mark) when used with a StreamWriter.

For UTf-8, the BOM consists of three bytes with the values 0xEF, 0xBB, 0xBF. These bytes are prepended to the output, so they would be sent as part of the POST data before the actual JSON text, and the tvdb server considers that to be bad JSON.

Remember, as I mentioned in the earlier post, you can create an instance of the UTF-8 encoding that does not emit a BOM, and that's done by default when you don't specify an encoding when you create the StreamWriter.


Take a look at the following links for more info:
https://en.wikipedia.org/wiki/Byte_order_mark

https://stackoverflow.com/questions/...-8-without-bom



Edit: I see I was too slow