views:

2082

answers:

3

I am having a problem with FCKeditor reverting html entities entered in the source view back to their original unicode representations. For example when I enter € into the source view, switch to html and then back to source view, the entity is replaced by an actual € symbol. The bigger problem, as a result, is that this unicode character is then sent back to the server on submit causing character encoding issues with the underlying database table. Anyone else come across this? I have tried many combinations of config settings but all to no avail.

+3  A: 

What version of FCKeditor are you using? The current version is 2.6.3. I tested the € symbol in their demo by copying € into source view, switched back to display and then back to HTML the ASCII € was retained correctly. As such it sounds like there might be a configuration problem with your install of FCKEditor or you need to upgrade.

Edit: Just found this gem in the FCKEditor documentation: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options/ProcessNumericEntities

Anne Porosoff
That's what I see in my installation as well.
buti-oxa
A: 

The problem was a configuration setting - FCKConfig.ProcessHTMLEntities=true.

Altough I had tried changing this in fckconfig.js, I did not realise that the value was being over-ridden in a secondary custom configuration file which had been created by a previous developer.

Thanks Anne.

mysomic
A: 

Thank you very much! It's very helpful for my same problem.