This is a migrated thread and some comments may be shown as answers.

Rtf with typographic quote problem

7 Answers 173 Views
Editor
This is a migrated thread and some comments may be shown as answers.
sawyer
Top achievements
Rank 1
sawyer asked on 07 Jun 2011, 02:47 PM
Hello !!

I have a problem with .LoadRtfContent of RadEditor with a rtf string. I lost my typographic quote(’ and ‘) and the double(“ and ”). But in a RichTextBox of Winform, I don't lost my quote.

Here is my string of rtf.

Dim rtfString As String = "{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl" & _
"{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}" &
"{\f2\froman\fprq2 Times New Roman;}}" & _
"{\colortbl\red0\green0\blue0;\red255\green0\blue0;}" & _
"\deflang1033\horzdoc{\*\fchars }{\*\lchars }" & _
"\pard\plain\f2\fs24 Test  LeftDoubleQuote=\ldblquote    RightDoubleQuote=\rdblquote    Test single quote LeftQuote=\lquote and RightQuote=\rquote \par }"

RadEditor1.LoadRtfContent(rtfString)

Thank's a lot for a response !!

7 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 Jun 2011, 08:39 AM
Hi Sawyer,

RadEditor for ASP.NET AJAX and RichTextBox of Winform work with different "Convert RTF to HTML" libraries and this one of RadEditor does not support typographic quotes. I logged the problem in our PITS system and we will try to provide support for typographic quotes in the future. Here you can find the PITS Issue: Public URL. I also updated your Telerik points.

Best regards,
Rumen
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
sawyer
Top achievements
Rank 1
answered on 10 Jun 2011, 01:58 PM
thank'S

Also is it normal to have the same problem with a rtf file ?
0
Rumen
Telerik team
answered on 15 Jun 2011, 01:37 PM
Hello Sawyer,

I uses MS Word to type typographic quotes in a RTF file and examined the saved file with a HEX editor. I noticed that the quotes were saved as \'93 and \'94.

So I was able to fix the problem by replacing
\lquote with \'93 
and
\rquote with \'94

These symbols will be rendered in RadEditor.

Kind regards,
Rumen
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
sawyer
Top achievements
Rank 1
answered on 30 Aug 2011, 03:24 PM
Hello !!

 I use this method but I get the wrong result. The \'93 become to a left double quote and the \'94 become to a right double quote.

How to have a right single quote and a left single quote ?


Thank's

0
Rumen
Telerik team
answered on 02 Sep 2011, 08:55 AM
Hello Sawyer,

Here are they are:

LeftQuote=\'91 and RightQuote=\'92 
LeftDoubleQuote=\'93  and  RightDoubleQuote=\'94  


All the best,
Rumen
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
sawyer
Top achievements
Rank 1
answered on 04 Oct 2011, 04:42 PM
Thank's it work


But I have a another problem with a rtf string

Example : 
Dim text as string = "{\rtf1 Test \par }"
RadEditor1.LoadRtfContent(text)

I have a error :
System.ArgumentNullException



But it work when I open with Word or another rtf reader.



0
Dobromir
Telerik team
answered on 05 Oct 2011, 08:23 PM
Hi Sawyer,

The reported error occurs because the string that you are trying to load in the editor is very simple and is missing definitions for fonts and etc. While RTF applications may have predefined default values for such configurations the third party tool used to provide this functionality for RadEditor does not and the content that is going to be loaded should contain those definitions default values.

Kind regards,
Dobromir
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Editor
Asked by
sawyer
Top achievements
Rank 1
Answers by
Rumen
Telerik team
sawyer
Top achievements
Rank 1
Dobromir
Telerik team
Share this question
or