Knowledge Base

Special characters aren’t showing up correctly

“Special characters”, character sets, character encoding, and such are a very tricky issue.

Special characters are totally dependent on your browser’s interpretation of the character set. It might look correct in your browser to use direct characters but there is no guarantee that it will look correct in other people’s browsers. This is a limitation of how character sets are currently used and implemented; not necessarily in EE, but in the web in general. If my browser is set to Western European, for example, and I use a high ASCII value, it will only look correct in your browser if you also have it set to Western European—and if the server upon which my site lives supports the same character set. If any of the three conditions are not met there is no guarantee that it will look correct.

Hopefully at some point the whole world will migrate to UTF-8 and there won’t be any concern over characters, but at this point, there is only one way to ensure that high ascii values will render consistently, and that is to use entities.  Character entities look something like —, which is the numeric character entity that will produce the (em-dash) character.

The Mozilla site has a very nice list of character entities for reference.  It is generally considered safer to use numeric entites (such as the — above) as opposed to named character entities such as ”—”.

ExpressionEngine does try to make the use of high-ASCII or “special” characters easier, however.  Go to Admin > Global Weblog Preferences and make sure you have the “Automatically Convert High ASCII Text to Entities” set to YES.

Last Updated on Feb 27, 2007 at 10:20   ( Permalink )
Category: Technical Issues, Troubleshooting