Forcing browser to use UTF-8

  • Thread starter Jafar As-Sadiq Calley
  • Start date
J

Jafar As-Sadiq Calley

Hi

I'm doing a new website and I have a little problem with character
encoding. I want to use UTF-8 otherwise some of the text has funny
characters in it. Go to
http://dhikr.homelinux.org/suhbah/dontbeasheikh.html
and you will see what I mean.
I have put in the <head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Is that enough to make sure the user's browser detects and uses UTF-8?

Many thanks for suggestions.
 
B

Benjamin Niemann

Jafar said:
Hi

I'm doing a new website and I have a little problem with character
encoding. I want to use UTF-8 otherwise some of the text has funny
characters in it. Go to
http://dhikr.homelinux.org/suhbah/dontbeasheikh.html
and you will see what I mean.
I have put in the <head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Is that enough to make sure the user's browser detects and uses UTF-8?

No. The webserver sends 'text/html; charset=ISO-8859-1' as the Content-Type
in the HTTP headers, which overrides the declaration in your documents.
You'll have to configure your server to either send 'charset=utf-8' or omit
the charset parameter, in which case a user-agent should use the charset
declaration from the META element.
 
J

Jafar As-Sadiq Calley

No. The webserver sends 'text/html; charset=ISO-8859-1' as the Content-Type
in the HTTP headers,

I see, so I have to go and dig around in my Apache config? Sounds like
fun. The wife won't see me for a few hours ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top