Hello,
We are using a licensed version of Aspose.Words DLL Version - 9.2.0.0. We are first converting the Bytes to String using the below piece of code:
str = System.Text.Encoding.Default.GetString(bytes);
We then manipulate with the string and replace certain tags with data values. For Eg. "TagTodaysDate" gets set to "31 août 2015". We then again convert the String to Bytes using the below piece of code:
bytes = System.Text.Encoding.Default.GetBytes(str);
We need to store this text as an attachment hence, we are converting it into Document using the Aspose DLL as per below piece of code:
Stream attachMemStm = new MemoryStream(bytes)
Aspose.Words.Document docAttachment = new Aspose.Words.Document(attachMemStm);
While coverting the memory stream to attachment below exception occurs:
a) DecoderFallBackException - Unable to Translate bytes [C3] at index X from specified code page to Unicode.
b) XMLException - Invalid character in the given encoding
This seems to be due to the character - é which is equivalent to "c3 a9" in UTF8
Suggestions please.Hello,
We are using a licensed version of Aspose.Words DLL Version - 9.2.0.0. We are first converting the Bytes to String using the below piece of code:
str = System.Text.Encoding.Default.GetString(bytes);
We then manipulate with the string and replace certain tags with data values. For Eg. "TagTodaysDate" gets set to "31 août 2015". We then again convert the String to Bytes using the below piece of code:
bytes = System.Text.Encoding.Default.GetBytes(str);
We need to store this text as an attachment hence, we are converting it into Document using the Aspose DLL as per below piece of code:
Stream attachMemStm = new MemoryStream(bytes)
Aspose.Words.Document docAttachment = new Aspose.Words.Document(attachMemStm);
While coverting the memory stream to attachment below exception occurs:
a) DecoderFallBackException - Unable to Translate bytes [C3] at index X from specified code page to Unicode.
b) XMLException - Invalid character in the given encoding
This seems to be due to the character - é which is equivalent to "c3 a9" in UTF8
Suggestions please.