views:

389

answers:

2

Good day.

In my Drupal site, strange characters appear in text. Like, instead of what I expect "ideéenbus" I get De ide�enbus (I hope this comes out right here)

Now this has to do with a character encoding issue somewhere. But, how can I set this in Drupal? Or is it something that needs to be set on the database instead? Hope someone can help.

Thank you Marco

A: 

Check the character encoding of your database tables. Make sure it is UTF-8.

Chris J
+4  A: 

To have a good experience in encoding in Drupal and PHP in general, all the items should speak the same encoding, ideally UTF8, or they should be aware of differences and act accordingly.

The following components should be checked:

  • database encoding: see it from the db management console
  • page encoding: does your theme define anything about the encoding in the Head of the pages?
  • web server default encoding: this can be set by apache. Open a page in Firefox, right click on the page, click on Show page information, and check info about encoding and headers
  • drupal encoding: drupal uses UTF-8 (see: http://drupal.org/node/8408) so this should not be an issue
Palantir
sometimes the file encoding causes this too. if you don't use utf-8 while saving your template files, some foreign characters may not show as it should.
hecatomber