Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Characters changed

Reply
Thread Tools

Characters changed

 
 
shapper
Guest
Posts: n/a
 
      10-20-2008
Hello,

I have an image which alt attribute is "à educação".

When I preview the web site it becomes "à educação"

I have the following on my head:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /
>


What am I doing wrong?

Thanks,
Miguel
 
Reply With Quote
 
 
 
 
Mayeul
Guest
Posts: n/a
 
      10-20-2008
shapper a écrit :
> Hello,
>
> I have an image which alt attribute is "à educação".
>
> When I preview the web site it becomes "à educação"
>
> I have the following on my head:
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /
>
> What am I doing wrong?
>
> Thanks,
> Miguel


If your page is served from the web it doesn't matter what you put in
your <meta http-equiv="Content-Type">.

The browser will override it with whatever the http header Content-Type
indicates.

Solution: ensure the document is served with a "Content-Type: text/html;
charset=utf-8" http header.

--
Mayeul
 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      10-20-2008
Mayeul wrote:

> If your page is served from the web it doesn't matter what you put in
> your <meta http-equiv="Content-Type">.


It surely matters, if the server does not specify Content-Type.

> The browser will override it with whatever the http header
> Content-Type indicates.


Yes, _if_ such a header is sent.

> Solution: ensure the document is served with a "Content-Type:
> text/html; charset=utf-8" http header.


In the absence of a URL, we cannot possibly know what that would fix the
problem or make it worse. If the data is actually ISO-8859-1 or Windows-1252
encoded, for example, it does no good to declare even at the HTTP level that
it is UTF-8.

The crucial question is what the encoding of the page really is. The URL
would tell that, among other things.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Mayeul
Guest
Posts: n/a
 
      10-20-2008
Jukka K. Korpela a écrit :
> Mayeul wrote:
>
>> If your page is served from the web it doesn't matter what you put in
>> your <meta http-equiv="Content-Type">.

>
> It surely matters, if the server does not specify Content-Type.
>
>> The browser will override it with whatever the http header
>> Content-Type indicates.

>
> Yes, _if_ such a header is sent.
>
>> Solution: ensure the document is served with a "Content-Type:
>> text/html; charset=utf-8" http header.

>
> In the absence of a URL, we cannot possibly know what that would fix the
> problem or make it worse. If the data is actually ISO-8859-1 or
> Windows-1252 encoded, for example, it does no good to declare even at
> the HTTP level that it is UTF-8.
>
> The crucial question is what the encoding of the page really is. The URL
> would tell that, among other things.
>


Indeed I assumed too much. Thanks for the correction.

--
Mayeul
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
changed state to up changed state to down FastEthernet LINEPROTO-5-UPDOWN surrealarmada@gmail.com Cisco 3 03-07-2007 06:06 PM
scroll position is changed when style is changed? mxbrunet Javascript 1 11-03-2006 03:40 AM
ASP.NET: dollar sign ($) changed to undisplayable characters Norman Yuan ASP .Net 0 12-08-2005 11:17 PM
xmlDocument.Save "&#10;" getting changed changed to "&amp;#10" st@jpa.co.jp ASP .Net 1 10-11-2005 01:30 PM
help-> xslt transformation to pdf (chinese characters changed to # characters) omegaman XML 1 09-21-2004 10:44 PM



Advertisments