I'm using this method to write to a MemoryStream object, which is subsequently stored a binary in SQL. It is being used to read in .HTML files from the file system on Windows.
How do I know which type of encoding this data is being read in as? Thanks.
None, because it opens a binary stream. When you e.g. wrap stream into a StreamReader
, that's the moment you choose the encoding. The FileStream
itself as returned by the OpenRead
method is not text based and thus does not have an encoding.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With