[opencms-dev] XML Content Editor Not Saving Special Characters Correctly

Christian Steinert christian_steinert at web.de
Mon Apr 20 19:35:31 CEST 2009


> I presume you were referring to the "content-encoding" property of the
> JSPs within the virtual file system. So, I tried setting the
> "content-encoding" property of the following JSPs (and folder) to
> "UTF-8":
>
> system/workplace/editors/editor.jsp
> system/workplace/editors/editor_main.jsp
> system/workplace/editors/xmlcontent/editor.jsp
> system/workplace/editors/xmlcontent/editor_form.jsp
> system/workplace/editors
>
> But sadly, this change did not fix my problem. The XML Content Editor
> is still appending garbage characters in front of any special
> characters in my text. Whereas, "Edit Control Code" will still save
> special characters correctly. Incidentally, my content JSPs will
> render special characters correctly. The problem is getting the
> special characters in, not getting them out.
>
> Am I changing the correct property? Are there other files I should change?
>   
I was thinking about the "encoding" property for the resources that you 
are editing.
In other words, if you have a page /sites/default/foo.html, then try to 
change the "encoding" property of that resource to UTF-8 and then see if 
editing the resource and entering special chars will cause your special 
chars to be saved properly.

You had also asked:

> Incidentally, a former colleague "skinned" a few OpenCMS JSPs. If
> anyone thinks that might be a problem, I would be interested to know
> which JSPs are associated with the XML Content Editor. 

Please take a look at the administration view into the module 
management. Then choose the module of the FCKEditor (I presume that this 
is the editor that you are using.) In the detail view of that module, 
you should be able to go to a "resources" view that references all files 
and folders in the opencms file system that are associated with this module.

To see if these modifications are your problems, I would recommend that you:
- increase the version number of the fckeditor through the opencms 
module management
- export the fckeditor module with the module management (so that you 
can re-import the modfied files again later, if you like
- grab the regular version of the zip-file with the fckeditor module 
(you can get that from the opencms install package)
- Install the unmodified version of the fckeditor module through the 
module management, which will undo any customizations to the files that 
belong to this module

Since you do not seem to know in which way the system has been altered, 
re-importing a clean editor module is really to be recommended.
It might even better to re-import all modules of the opencms workplace 
(you could try that in a copied version of your system) and then see if 
that resolves your problem.

Best Regards
Christian



More information about the opencms-dev mailing list