views:

83

answers:

5

Hi, I am having problem to display the special characters like ’, é in Firefox and IE. But these characters are supported for the local server.

I have used the following

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Can anyone suggest me what the might be? Thanks in advance.

+2  A: 

You've set the charset to iso-8859-1 - are you sure that's how they're encoded in your HTML?

In Firefox, try changing the charset using View -> Character Encoding (for your page it should have "Western (ISO-8859-1)" selected), and see if it works with another character encoding. If it does, consider either re-encoding your HTML into UTF-8, or changing the charset in your meta tag.

Dominic Rodger
Simple, just switch to UTF-8 in order to have much less problems.
Sorin Sbarnea
+1  A: 
NeonBlue Bliss
A: 

You've set the charset in the document's meta tag, which works when you're viewing it as a file, but if the web server is providing a charset value, that takes priority. Check the HTTP headers that the web server is providing; one way is with the Firefox extension Live HTTP Headers. If it's something different, you have to tell the web server what you're doing or else reencode the document to match.

How to set the encoding varies between web servers. Apache, for example, lets you specify the charset globally, per-file in .htaccess, or by renaming the file to example.html.latin1.

jleedev
A: 

Use HTML Entities like &aacute; or &#225; and the browser should sort it out.

Here is a list:

http://www.utexas.edu/learn/html/spchar.html

carillonator
A: 

change your encoding meta tag to:

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