Back to Top

Problem with German special character

Nowadays I am working on an application in WordPress and got many issues regarding character Encoding especially for German characters like (ä,ü,ë) and the ones that are coming from the database. It happened in all the browsers. I checked my browser and its character Encoding is UTF-8 and those characters are ISO-8859-1 so I have added the meta tag mentioned below:

And also have added the following line in my htaccess file :

After doing that still, the characters have some problem and it doesn’t look proper. I found that ä,ü,ë etc are the ISO-8859-1 so if I change my browser Encoding to ISO-8859-1, it works fine but whenever I change browser to UTF-8 , it doesn’t work.

Finally, I have created one function which converts string for encoding characters and solved the character problems too:

Recommended Read
Clean HTML content in PHP
Convert RGB to Hex HTML code in PHP
Get English Ordinal Number Suffix in PHP

Let’s have a look with one simple example

Thanks for reading this article :). I hope this solution helpful to you. If you have any concern, please share your thoughts on the comment section.

Comments (2)

  1. I read many badly wttiren articles these days. This article is a breath of fresh air. It’s nice to see you care about what and how you present your views.

  2. Thanks this function helps me a lot.

    Thanks Again.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

How to clean HTML content in PHP?

Posted on 10 years ago

Bhumi