I have the following code where I create a file in memory and upload to S3 bucket.
I'm struggling with UTF8 encoding the file. It is being delivered as a UTF16le.
current code:
// Create the data to write to the stream.
byte[] memstring = uniEncoding.GetBytes(fileContent);
using (MemoryStream memStream = new MemoryStream(10000))
I have tried using this but does not work for me:
byte[] memstring = Encoding.UTF8.GetBytes(fileContent);
Any help is appreciated.