By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,632 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,632 IT Pros & Developers. It's quick & easy.

Char encoding and subsets

P: n/a
This is my understanding so far, and please correct any errors:

1. US-ASCII is a subset of ISO-8859-1
2. US-ASCII is a subset of UTF-8
3. ISO-8859-1 is not a subset of UTF-8

But ... are the numeric entities (in hex or decimal) for ISO-8859-1
the same in UTF-8?

Can an HTML document that uses only Latin-1 numeric entities have
its content-type changed to UTF-8 and still be valid?

Do Latin-1 numeric entities have to be written either as x## or ###,
or can they have trailing zeros, like x00## or 0###, which is what
you would have with UTF-8?

TIA

Ian
--
http://www.aspipes.org/
http://www.bookstacks.org/
http://www.learnsomethingnew.us/
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ian Rastall <id*******@sbcglobal.net> wrote:
3. ISO-8859-1 is not a subset of UTF-8
Since "subset" could only refer to character _sets_ but not encodings,
your statement is meaningless.
But ... are the numeric entities (in hex or decimal) for ISO-8859-1
the same in UTF-8?
There are entities like &#ouml; and numeric character references
like ö . The number (246) refers to Unicode and it happens to be
the same code position in ISO-8859-1 whenever number < 256. (That
includes the range 128...159, which are no graphic characters.)
<http://www.w3.org/TR/html4/charset.html#h-5.3.1>
Can an HTML document that uses only Latin-1 numeric entities have
its content-type changed to UTF-8 and still be valid?
Yes - if you mean "numeric character references" and Content-type
"text/html;charset=UTF-8".
Do Latin-1 numeric entities have to be written either as x## or ###,
or can they have trailing zeros, like x00## or 0###,
What's the point in writing ö ?
which is what you would have with UTF-8?


No, we wouldn't.
Jul 20 '05 #2

P: n/a
Thanks, man. I knew what to expect, so I got a smile out of it. But
that link will come in very handy, and I did get my questions
answered.

Ian
--
http://www.aspipes.org/
http://www.bookstacks.org/
http://www.learnsomethingnew.us/
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.