XML header in Web Report
Hi I found that report templates are sometimes saved with a title like: or
Unknown reason, this text results in an error because the template is trying to load the text as Base64 encoded.
I changed the code and now it works like this:
/// \FastReport-master\FastReport.Base\Report.cs
const string cnstXMLHeader = "<?xml version=\"1.0\" encoding=\"utf-8\"";
//int startIndex = s.IndexOf("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
int startIndex = s.IndexOf(cnstXMLHeader, 0, StringComparison.OrdinalIgnoreCase);
if (startIndex != -1)
{
UTF8Encoding encoding = new UTF8Encoding();
using (MemoryStream stream = new MemoryStream(encoding.GetBytes(s.Substring(startIndex))))
///
Hi @RedKot73 . Hmm, can you create pull request with this fix? I don't quite understand what was changed