I am having some problems with accented characters used in the german and french languages.
I can paste this text into FCKeditor just fine, but when the text is submitted and viewed again in the editor it gets screwed up.
This problem has already been posted by 3 people in another thread ( https://sourceforge.net/forum/message.p ... id=2184894 ) but I didn't see any posts about how to get around it? I'm afraid we will have to use another editor if we can't get this problem resolved.
Thanks for any help.
-Ryan
Wed, 09/01/2004 - 05:44
#1
RE: Problem with german characters - no fix yet?
Replace htmlentities( ) with htmlspecialchars() in fckeditor.php (line ~44):
//$grstr = htmlentities( $this->Value ) ;
$grstr = htmlspecialchars( $this->Value ) ;
RE: Problem with german characters - no fix yet?
Thanks,
-Ryan
RE: Problem with german characters - no fix yet?
Ryan,
Have you confirmed this is an issue with fckeditor? I'm thinking it may be a Unicode issue, as we've had no trouble with Russian, Arabic, Chinese and Thai (and English ) with this editor. Never tried German, but every accented or special char corruption issue I've seen so far has been related to getting CF to properly work with Unicode.
RE: Problem with german characters - no fix yet?
I've got it fixed, thanks to an email from Dominique (I had emailed him because he mentioned the same problem in this forum a few months ago). Since I'm the 4th person on this forum to have this problem with Fckeditor, it might be good to have this in the documentation (what documentation .
To fix it I changed my charset from unicode to iso-8859-1. So I have this at the top of my files:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
I really have no idea what the different character sets are for, so hopefully this change doesn't mess anything else up. Does anyone know of a resource on the web that will explain when one would use unicode or iso-8859-1?
Thanks,
-Ryan
RE: Problem with german characters - no fix yet?
RE: Problem with german characters - no fix yet?
I never seen any way to fix these problem
I hope we will find...
good luck
Thibaut
RE: Problem with german characters - no fix yet?
You have to change the file "fck_editor.js".
First of all insert the following function:
//AT 10/2004 replaces special characters
function replaceSpecialChars(text)
{
text = text.replace(//g, "Ä");
text = text.replace(//g, "ä");
text = text.replace(//g, "Ü");
text = text.replace(//g, "ü");
text = text.replace(//g, "Ö");
text = text.replace(//g, "ö");
text = text.replace(//g, "ß");
//any other characters.....
return text;
}
Than modify the function "switchEditMode" as follows:
Add the line "txtSource.value = replaceSpecialChars(txtSource.value) ; //AT 10/2004 - replaces special characters"
after the line "txtSource.value = objContent.DOM.body.innerHTML ;"
This will show the special charcters in the "html-style" (ü) in the edit mode
Now you have to replace the else condition at the function "setFieldValue":
The new condition looks like this:
else
{
//AT 10/2004 replaces special characters
var temp = replaceSpecialChars(objContent.DOM.body.innerHTML)
oLinkedField.value = temp;
//oLinkedField.value = objContent.DOM.body.innerHTML ;
}
Hope I found a good solution, maybe it's not a really tidy one, but it works.
Grsse aus Ravensburg (Germany)