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.

Share:
Share on Facebook0

Share on LinkedIn0Tweet about this on TwitterShare on Google+0Buffer this pageDigg thisShare on Reddit0

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 *

Most Popular Posts

The Readers’ Poll – January 2013

Posted on 4 years ago

Bhumi

How to define PHP Magic constants

Posted on 5 years ago

Zinal

How to use session in Magento

Posted on 4 years ago

Bhumi

How To Sort by custom fields in WordPress

Posted on 4 years ago

Zinal

How to Use PHP CodeSniffer?

Updated 17 years ago

Bhumi

AWS Cloud Database Migration Service

Updated 17 years ago

Bhumi

How does CI/CD works on AWS?

Updated 17 years ago

Bhumi

Overview of Amazon Web Services (AWS)

Updated 17 years ago

Bhumi

The Reader’s Poll – June 2015

Posted on 1 year ago

Bhumi

The Reader’s Poll – August 2014

Posted on 2 years ago

Bhumi

The Reader’s Poll – June 2014

Posted on 2 years ago

Bhumi

The Readers’ Poll – May 2014

Posted on 2 years ago

Bhumi

The Readers’ Poll – August 2013

Posted on 3 years ago

Bhumi