Characters changed

Discussion in 'HTML' started by shapper, Oct 20, 2008.

  1. shapper

    shapper Guest

    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
    shapper, Oct 20, 2008
    #1
    1. Advertising

  2. shapper

    Mayeul Guest

    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
    Mayeul, Oct 20, 2008
    #2
    1. Advertising

  3. 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/
    Jukka K. Korpela, Oct 20, 2008
    #3
  4. shapper

    Mayeul Guest

    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
    Mayeul, Oct 20, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    678
    Rosanne
    Oct 11, 2005
  2. Norman Yuan
    Replies:
    0
    Views:
    858
    Norman Yuan
    Dec 8, 2005
  3. Replies:
    2
    Views:
    759
  4. omegaman
    Replies:
    1
    Views:
    559
    omegaman
    Sep 21, 2004
  5. mxbrunet
    Replies:
    1
    Views:
    210
Loading...

Share This Page