Character encoding.

  • Thread starter =?iso-8859-1?Q?Dav=E9mon?=
  • Start date
?

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

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.
 
N

Nije Nego

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
 
?

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

Nije Nego arranged shapes to form:
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
 
J

Jukka K. Korpela

Davémon said:
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.
 

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,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top