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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Copying RTF from RichEditBox to SfRichTextBoxAdv

Thread ID:





120038 Aug 25,2015 10:49 PM UTC Aug 27,2015 09:04 AM UTC WinRT 4
Tags: SfRichTextBoxAdv
Nima Tayebi
Asked On August 25, 2015 10:49 PM UTC

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.\r\nParameter 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?

Nima Tayebi
Replied On 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


Narendran Srinivasan [Syncfusion]
Replied On 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.


Nima Tayebi
Replied On 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.

Arumuga Perumal S [Syncfusion]
Replied On 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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon