We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Copying RTF from RichEditBox to SfRichTextBoxAdv

I'm getting this exception while loading the stream into SfRichTextBoxAdv

{"'Windows-1252' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.\rParameter name: name"}


                var iStream = new InMemoryRandomAccessStream();
                this.ContentTextBox.Document.SaveToStream(Windows.UI.Text.TextGetOptions.FormatRtf, iStream);
                this.RichTextBoxAdv.Load(iStream.AsStream(), Syncfusion.UI.Xaml.RichTextBoxAdv.FormatType.Docx);

Any idea how I can fix this?

4 Replies

NT Nima Tayebi August 26, 2015 08:00 AM UTC

It took me a while but I found the solution.
Windows-1252 is downloadable with a NuGet package: System.Text.Encoding.CodePages

Then I needed to add this line to my code


NS Narendran Srinivasan Syncfusion Team August 26, 2015 11:44 AM UTC

Hi Nima

Thanks for choosing Syncfusion products,

The mentioned exception is raised due to not installing the ‘System.Text.Encoding.CodePages’ so when we accessing the GetEncoding method this exception raised. Once the nugget ‘System.Text.Encoding.CodePages’ has installed this exception has been resolved. But in our machine we could not able to reproduce the mentioned exception while loading RichEditBox document stream in our SfRichTextBoxAdv control. In our side the given code snippet is working fine in our supported platforms. We request you to provide the details about Visual Studio, Operating system versions and in which platform and framework you are getting this issue. If possible please provide us a sample so that we can validate more on this and provide you with appropriate solution at the earliest.

Please let us know if you have any other questions.


NT Nima Tayebi August 26, 2015 05:22 PM UTC

Hi Narendran, 
I'm using WinRT libraries on Windows 10 UWP that is not officially supported by your the libraries. 
Please let me know if you need more information.

AP Arumuga Perumal S Syncfusion Team August 27, 2015 09:04 AM UTC

Hi Nima,

Thank you for your update.

We have already provided support for SfRichTextBoxAdv control in Universal Windows platform and is included with our Essential Studio for UWP. You can download it from the following link.


You can use our UWP assemblies for building Universal Windows applications.

Please let us know if you have any other questions.

Arumuga Perumal S.

Live Chat Icon For mobile
Up arrow icon