Hello,
I am new to CKEditor. I am writing a C++ application that includes a Gecko web engine. I am using CKEditor to implement HTML edition features for an e-mail program.
So, when I want to display the e-mail content, I just display it in an html page within the gecko engine. In this case, everything is OK. But, when I want to reply to the mail, I display an html page that includes CKEditor and I use it to edit the e-mail content. In this case, I am not able to get the accents (éèâ..) properly. I tried different encoding characters convertions, but none of them were successful.
In order to set the content of the e-mail, I use the following javascript command :
CKEDITOR.instances['editor1'].insertHtml('%s');
where the %s is filled with the html content of the original mail. Just before executing this code, I execute the following javascript instruction :
alert('%s');
where the %s is filled with the same data. If I fill with the proper encoding, the pop-up dialog displays properly the content of the e-mail with the accents properly displayed, which let me suppose the conversion is OK. but CKEditor does not display them properly.
I tried several things, including changing the encoding of my http page (content="text/html; charset=..." stuff in meta tag), but with no success.
Note that when the accents are entered by key pressed by the user, they are properly displayed. The problem only occurs for accents entered with the 'insertHtml' method.
Does someone has an idea on how to solve this problem ?
Thanks in advance,
Brice
Re: Encoding problem when inserting text from javascript
I am really stuck with this problem and I suppose someone has already performed something similar. Just a hint would already be a good starting point...