Hi,
I am using your Editor control in my ongoing project, all of the thing are working well but when I tried to save the content in edit into html file the problem arises. The problem arises whenever I copy and paste the text from any where with in editor control; like " my text . my text .", the text display in editor properly, regardless after completing to paste the text into the control , I save the content into html external file, a special character "Â" automatically displayed into the html file. Further more I also tried to see the code "Â" in the source of HTML, it is not in the source of html. I think it is unusual problem.
I tried to resolve this problem but I am unable to resolve that problem. Even I used your samples too the same problem occurs while using the telerik samples, below is my infected code :
Adeel Ahmed
I am using your Editor control in my ongoing project, all of the thing are working well but when I tried to save the content in edit into html file the problem arises. The problem arises whenever I copy and paste the text from any where with in editor control; like " my text . my text .", the text display in editor properly, regardless after completing to paste the text into the control , I save the content into html external file, a special character "Â" automatically displayed into the html file. Further more I also tried to see the code "Â" in the source of HTML, it is not in the source of html. I think it is unusual problem.
I tried to resolve this problem but I am unable to resolve that problem. Even I used your samples too the same problem occurs while using the telerik samples, below is my infected code :
Adeel ahmed  . Adeel ahmed . Adeel ahmed  . Adeel ahmed . Adeel ahmed  . Adeel ahmed . Adeel ahmed  . Adeel ahmed . Adeel ahmed  . Adeel ahmed . Adeel ahmed  . Adeel ahmed .
Kindly help me I am in trouble.Adeel Ahmed
5 Answers, 1 is accepted
0
Hi Adeel,
This is definitely an encoding problem. You should set you page and request encodings to be UTF-8.
Set UTF-8 encoding in the page with the editor:
<meta http-equiv="content-type" content="text/html; charset=utf-8">
You should set UTF-8 in the Web.config of your web application
<?xml version="1.0" encoding="utf-8" ?>
as well as the following globalization tag in the <system.web> tag in the web.config file.
<globalization fileEncoding="UTF-8"/>
If you store the content in a database, then you should change the data type of the database column to nchar or ntext. The nchar type returns the Unicode character with the given integer code, as defined by the Unicode standard.
You can find additional information about these SQL column types in the MSDN help center by following the next link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_na-nop_25gy.asp.
Additionally, if you have installed the editor's demo examples on your PC, you can test the Database example and see how the editor works and saves the content there.
Kind regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
This is definitely an encoding problem. You should set you page and request encodings to be UTF-8.
Set UTF-8 encoding in the page with the editor:
<meta http-equiv="content-type" content="text/html; charset=utf-8">
You should set UTF-8 in the Web.config of your web application
<?xml version="1.0" encoding="utf-8" ?>
as well as the following globalization tag in the <system.web> tag in the web.config file.
<globalization fileEncoding="UTF-8"/>
If you store the content in a database, then you should change the data type of the database column to nchar or ntext. The nchar type returns the Unicode character with the given integer code, as defined by the Unicode standard.
You can find additional information about these SQL column types in the MSDN help center by following the next link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_na-nop_25gy.asp.
Additionally, if you have installed the editor's demo examples on your PC, you can test the Database example and see how the editor works and saves the content there.
Kind regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Adeel
Top achievements
Rank 1
answered on 27 Jun 2008, 09:40 AM
Well thanks for the reply.
I am still facing the same problem. Although I have added it in your samples and also tried in my project. Actually there is no issue which playing with your control, I am facing this problem when the HTML has been saved as an external file. Inside the source of the html file there is no special charcter but when I open it in the browser then the special character comes in along with the html contents.
please tell me the solution I am really in trouble.
Regards,
Adeel Ahmed
I am still facing the same problem. Although I have added it in your samples and also tried in my project. Actually there is no issue which playing with your control, I am facing this problem when the HTML has been saved as an external file. Inside the source of the html file there is no special charcter but when I open it in the browser then the special character comes in along with the html contents.
please tell me the solution I am really in trouble.
Regards,
Adeel Ahmed
0
Hi Adeel,
The problem is most likely due to the encoding of the file in which you save the content. Is the external file saved with the proper Unicode (UTF-8 with signature) encoding as it is shown in the attached screenshot?
Best regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The problem is most likely due to the encoding of the file in which you save the content. Is the external file saved with the proper Unicode (UTF-8 with signature) encoding as it is shown in the attached screenshot?
Best regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Roderick Prince
Top achievements
Rank 1
answered on 21 Feb 2009, 08:26 PM
Note that if you are using Telerik's code related to saving in the current file (http://www.telerik.com/support/kb/aspnet-ajax/editor/saving-radeditor-prometheus-content-directly-in-the-aspx-or-ascx-file-containing-the-editor.aspx) they don't specify utf8 in the StreamWriter:
StreamWriter sw = new StreamWriter(fs);
vs
StreamWriter sw = new StreamWriter(fs, Encoding.UTF8);
StreamWriter sw = new StreamWriter(fs);
vs
StreamWriter sw = new StreamWriter(fs, Encoding.UTF8);
0
Hi Roderick,
Thank you for pointing this omission. I updated the KB article as well as your telerik points for your assistance.
Best regards,
Rumen
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Thank you for pointing this omission. I updated the KB article as well as your telerik points for your assistance.
Best regards,
Rumen
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
