[thelist] Help with character encodings

Craig Saila crsaila at yahoo.ca
Wed May 22 15:24:00 CDT 2002


Joel Konkle-Parker wrote:
> I need some help understanding character encodings (<?xml
> version="1.0" encoding="something"?>). How do you know what encoding
> you're writing in? Is it set OS-wide? Program-specific? If so, how do
> I set which encoding 1st Page 2000 uses in its files? How do I know
> which is uses, if I can't change it?

Firstly, avoid using the XML declaration (<?xml version="1.0"
encoding="something"?>) unless it is an XML file only. It can cause
minor problems in some browsers (like IE 6).

For a discussion on this see:
<http://www.alistapart.com/stories/doctype/discuss/>

As for the encoding, this is based on the characters/language you are
using on the Web page. While encoding values are universal, the
particular browser may not render the page properly if the character set
it not installed (i.e., someone views a page with Japanese encoding, but
doesn't have that language installed on their computer).

The encoding value in XML defaults to "UTF-8", which is fine for most
Western languages. You can also specify one of the ISO sets, e.g.,
"ISO-8859-1"

For more about encodings, see the HTML spec:
<http://www.w3.org/TR/REC-html40/charset.html#encodings>

For more info about using XML declarations:
Web Developers Virtual Library: "XML Declaration"
<http://makeashorterlink.com/?K34024BE>

--
Cheers,

Craig Saila
------------------------------------------
craig at saila.com  :  http://www.saila.com/
------------------------------------------


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




More information about the thelist mailing list