Characters not dispaying correctly? - Start here please.

General questions regarding the use of languages and encoding issues in Joomla! 1.0.x. Multi-lingual site solutions can be discussed in the child board. Translation discussions are now separate and can be found in the Working Groups Area.
User avatar
Joomla! Guru
Joomla! Guru
Posts: 963
Joined: Sat Aug 20, 2005 9:19 am
Location: Israel

Characters not dispaying correctly? - Start here please.

Post by davidgal » Wed Sep 27, 2006 9:32 pm

The most probable reason for this is that you have an encoding mismatch in your site. This should be checked and possibly corrected before you start changing server default charsets, languages or database collations which usually never need to be touched.

An Encoding Mismatch means that your browser is not using the correct codepage to display special characters (extended ASCII) and they show up as something unexpected.

Alternately you may currently have the correct encoding in your browser but at some time in the past there was an encoding mismatch while data was inserted via a browser. This too will create unexpected results of special characters.

How to check this?
  • Find out what the correct encoding is for the language you are using in your site. As an example let's take Czech which uses iso-8859-2
  • Open a page of your site in your browser and ensure that the browser is set to automatically detect encodings
  • The browser should have detected iso-8859-2 which is also known as "Central European" encoding
If you got this far and and the browser is selecting encoding as expected but there are still bad characters then there are two possible problems:
1. If the corruption is in text that is part of content - this might have been inserted during some mismatch in the past. Try to insert some new text and see if it is OK.
2. If the corruption occurs in User Interface labels, then perhaps the language file you are using is for utf-8 use only. You should change the language file with one that was prepared for singlebyte encodings such as iso-8859-2.

If your browser did not select the correct encoding automatically then please check the following:
  • In your browser click on the menu item that displays the source of the currently displayed page. In the code near the top in the header tags you should find the following line for Czech encoding:

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
  • If you see a different charset value then you need to check your language file define for encoding as this is taken from there. You should open the language file (.php) in an editor and search for '_ISO'. You should see

Code: Select all

  • If the language file define is correct but something else shows up the page source code - then there is a problem with the template that you are using. A different, standard, template should be tried
  • Remember that if you wish to use Czech (for example) in your content while still keeping the original English language file for the site User Interface - then you should change the _ISO define in the language file from iso-8859-1 to iso-8859-2
  • For utf-8 related issues please see a separate sticky thread in this board

If you are still having problems
- don't start slashing your wrists - just place a post in this board with as much details as possible. Mainly please detail:
  • What language do you wish to display
  • What encoding does the browser select
  • Where are the problematic characters? In content or in User Interface labels?
  • What do you see in the charset value of the page source?
  • What is set in the language file define for '_ISO'?
David Gal


Return to “Language - 1.0.x”