开发者

Getting strange characters in text in Drupal...probably encoding issues, but how to solve

开发者 https://www.devze.com 2022-12-10 09:54 出处:网络
Good day. In my Drupal site, strange characters appear in text. Like, instead of what I expect \"ideéenbus\" I get De ide�enbus

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


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消