Character encoding.

Discussion in 'HTML' started by =?iso-8859-1?Q?Dav=E9mon?=, Apr 19, 2006.

  1. I've got some Spanish I need to mark up.

    Should I be using:

    ó or ó

    ó looks really ugly in the code, but will just ó be recognised by
    most things (firefox seems OK)? Oh and what about the html lang attribute /
    charset? Thanks.


    --

    Davémon
    http://www.nightsoil.co.uk/
     
    =?iso-8859-1?Q?Dav=E9mon?=, Apr 19, 2006
    #1
    1. Advertising

  2. =?iso-8859-1?Q?Dav=E9mon?=

    Nije Nego Guest

    On Wed, 19 Apr 2006 20:48:46 +0100, Davémon wrote:

    > I've got some Spanish I need to mark up.
    >
    > Should I be using:
    >
    > ó or ó
    >
    > ó looks really ugly in the code, but will just ó be recognised by
    > most things (firefox seems OK)? Oh and what about the html lang attribute /
    > charset? Thanks.


    utf-8 should do fine

    --
    o'tom po'tom
     
    Nije Nego, Apr 19, 2006
    #2
    1. Advertising

  3. Nije Nego arranged shapes to form:

    > On Wed, 19 Apr 2006 20:48:46 +0100, Davémon wrote:
    >
    >> I've got some Spanish I need to mark up.
    >>
    >> Should I be using:
    >>
    >> ó or ó
    >>
    >> ó looks really ugly in the code, but will just ó be recognised by
    >> most things (firefox seems OK)? Oh and what about the html lang attribute /
    >> charset? Thanks.

    >
    > utf-8 should do fine


    so just set charset=utf-8; raw accented characters (ó, é etc.) and set the
    <html lang="es">.

    why utf-8 and not iso-8859-1 ?

    thanks

    --

    Davémon
    http://www.nightsoil.co.uk/
     
    =?iso-8859-1?Q?Dav=E9mon?=, Apr 20, 2006
    #3
  4. Davémon wrote:

    > so just set charset=utf-8; raw accented characters (ó, é etc.)


    Well, that would be adequate if you have the characters (all the
    characters in the file) in UTF-8 encoding. Do you know this to be the case?

    The software you use to create web pages probably uses the ISO-8859-1
    (or windows-1252) encoding at least by default. It would be quite
    incorrect to label it as UTF-8 if it contains just one character outside
    the ASCII range.

    > and set the
    > <html lang="es">.


    You can do that, and it's recommendable in principle, but it has no
    effect whatsover on the character encoding issue.

    > why utf-8 and not iso-8859-1 ?


    Beats me. ISO-8859-1 works fine for Spanish except for some punctuation
    marks.

    All browsers that you need to care about get ó, é etc. correctly when
    they are ISO-8859-1 encoded and this encoding is declared in HTTP
    headers and/or in a meta tag. The problem is whether you _authoring
    software_ (including data transfer to a server) gets things right; it
    most probably does, but if you are using a Mac, you may need to do some
    checking.
     
    Jukka K. Korpela, Apr 20, 2006
    #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. Harley

    foreign character encoding

    Harley, Jul 26, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,002
    Harley
    Jul 26, 2003
  2. Hardy Wang

    Encoding.Default and Encoding.UTF8

    Hardy Wang, Jun 8, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    18,873
    Jon Skeet [C# MVP]
    Jun 9, 2004
  3. Replies:
    1
    Views:
    23,374
    Real Gagnon
    Oct 8, 2004
  4. raavi
    Replies:
    2
    Views:
    913
    raavi
    Mar 2, 2006
  5. Replies:
    2
    Views:
    375
Loading...

Share This Page