To acchieve correct presentation of websites, it needs a harmonic configuration, as many elements contribute:
Whenever you see text in a browser, a symphony of settings and configurations is played:
As a website-visitor you have one problem: you must configure your browser to automatically detect the encoding of the actual webpage, not using a default encoding for all websites of the world
As a website-producer, you have far more problems, unfortunately
but there is help, as knowledge about settings and configuration will help you to fix this problem.
whenever you see some funny question marks or other unexpected characters instead of special characters like german umlauts for example, üäöÜÄÖß,
check this:
your browser should detect the character encoding of the website automatically and not set a fixed encoding itself
in Firefox you can define that for example: View / Character Encoding / Automatically Other Browsers offer similar functions
As a CMSimple User and Administrator, you have to check far more things than a website visitor, for sure
First you must identify whether the editor is the reason for the broken character encoding or not
To do this,
If the special characters are wrong, it is definitely not the editor who causes the problem.
This information relates to APACHE webserver, as I have no knowledge of other servers unfortunately
Check the HTTP_ACCEPT_CHARSET of APACHE:
write the following php-script, name it info.php for example, upload it to your server and call it in the browser
do not forget to delete this file after the check, for security reasons
<?php phpinfo(); ?>
1. If you find the following information in the output, the server is configured well (for our purposes):
HTTP_ACCEPT_CHARSET UTF-8,*
configured well means that your server accepts UTF-8 plus eventually other encodings
2. If you do not see UTF-8 there,
with the following content:
AddCharset UTF-8
3. If you see read that the server accepts UTF-8, but not as the first characterset, maybe like this:
HTTP_ACCEPT_CHARSET iso-8859-1,UTF-8,*
then some of the browsers will not use UTF-8, but use iso-8859-1 instead
in that case ask your hoster to change the sequence of the charactersets or use a separate .htaccess-file for your cmsimple-directory (see above)
The CMSimple-Settings and the active template must be synchronized:
meta_codepage: UTF-8
<?php echo head() ;?>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
because the correct information is added by CMSimple to the output
there might be a collision between the file format of your template and the relating css-stylesheet when they are formatted in ANSI but not in UTF-8-formate
so it is suggested that you
Remember: you need an editor, not a wordprocessor for this step!
If you are a Windows-user, I suggest Notepad++, which is a really formidable editor
if you whish, you might add the following directive to your CSS-file stylesheet.css in the active template-directory as the very first line:
@charset “utf-8”;
It is helpful to convert other files as well to UTF-8-format.
To do so, download some files of your CMSimple installation, open them in the UTF-8-editor (Notepad++ for example), save them in UTF-8 without BOM format and re-upload them to your CMSimple directory at the server again.
These files are essential:
- content/content.htm
- otherlanguagedirectory/content/content.htm
- the language-files in the folder cmsimple/languages
- check your plugins for relevant files as they also should be formatted to UTF-8 format:
- - language files
- - stylesheets
- - templates
- - include files
The FCKEditor, like we distribute it in the FCKEditor4CMSimple-package, is UTF-8 by default. Older versions of FCKEditor do not support completely UTF-8, but you should not use those old versions for sure
The FCKEditor-Website at http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Localization says: “An important thing is to save the files in the UTF-8 encoded text format. Otherwise, some strange characters could appear instead of any special characters used by different languages, like accented letters, symbols, etc.”
The Editor uses some configuration files which you might edit If so, check them that they are all in UTF-8-file-format. These files and their location is defined in the editor-configuration:
FCKConfig.StylesXmlPath = '../fckstyles.xml' ; FCKConfig.TemplatesXmlPath = '/mytemplates.xml' ;
There are also languages files for the editor in the directory “editor/lang” , which you can check if they are in the correct format or not
If you use Editor-plugins with the FCKEditor, check these plugins as well whether they contain language files etc. which might be stored in a wrong format
FCKeditor4CMSimple keeps the relevant configuration files in the folder “custom_configurations”:
check them if they are stored in the correct file format
There was a suggestion to add a codepage-directive to forms which you use with CMSimple, so the user-input is stored in UTF-8-format in all cases to achieve this set your form-definitions in your pages, articles like this:
<form action="...." method="...." accept-charset="UTF-8">
There is a lot of information about UTF-8 out there in the web, a very interesting one is this: