|
Posted by Harlan Messinger on 06/21/07 17:33
David Dorward wrote:
> On Jun 21, 5:15 pm, Pietro <pietro...@gmail.com> wrote:
>> Im confused by these two lines that I include in my html:
>
>> <?xml version="1.0" encoding="utf-8"?>
>
> You should not be including this line in XHTML served as text/html
> (see Appendix C of the XHTML 1.0 spec). (For that matter, XHTML is
> generally a poor idea on the WWW). If you aren't using XHTML then you
> shouldn't be using it either.
>
>> <meta http-equiv="content-type" content="text/html; charset=utf-8">
>
> And if you are using XHTML then you're missing a slash.
>
>> Can I choose any encodings I want here or is the correct choice
>> related to how my editor saves my files?
>
> You need to specify the encoding the document is saved in.
More precisely, the encoding in which the document is transmitted to the
client, though ordinarily I guess that would be the same as the encoding
in which it's saved.
> A good
> editor will let you choose. Note that real HTTP headers trump any
> claim in the document and that they are the correct place to tell the
> client what encoding you are using.
>
>> Does using UTF-8 offer a portability advantage over the other encodings?
>
> It can encode pretty much any character you are likely to need, and
> does have wide support.
>
>> How to choose?
>
> If in doubt, UTF-8.
Navigation:
[Reply to this message]
|