RE: Character encoding (was Re: RSS 1.1)
"Jon Hanna" <jon-YK+g4hZFQDMeIZ0/[email protected]>
| Newsgroups | gmane.network.syndication.rss.devel |
|---|---|
| Message-ID | <[email protected]> |
> "Since US-ASCII is a subset of UTF-8, users MAY use US-ASCII as the
> encoding for RSS 1.1 documents. An explicit charset parameter MUST be
> used when serving an RSS 1.1 document as anything other than
> US-ASCII."
>
> Surely if I MUST use UTF8/16/32, then I can't use US-ASCII? Yes, it's
> a subset, but I read the first requirement to say that the charset
> and document encoding MUST be UTF8/16/32, so I don't see how
> that allows
> me to use US-ASCII instead?
If you use US-ASCII but label it as UTF-8 it will work, since the UTF-8
encoding for all characters catered for by US-ASCII is identical to the
US-ASCII encoding.
> Where does the requirement to restrict possible encodings come from?
> (Just curious, probably a lengthy debate which I missed). Why not
> SHOULD use UTF8/16/32 but MAY use others, e.g. USASCII.
All XML parsers can handle UTF-8 and UTF-16 it is good practice to only
output in one of those. In practice sticking with UTF-8 is generally a good
idea.
Having said that, I don't recommend UTF32 for bytes-on-the-wire and saying
one SHOULD output in UTF-8 or UTF-16 (and perhaps informally recommending
UTF-8), MUST accept UTF-8 and UTF-16 and MAY use other encodings as per the
XML rules for doing so would be consistent with C018.
Regards,
Jon Hanna
Work: <http://www.selkieweb.com/>
Play: <http://www.hackcraft.net/>
Chat: <irc://irc.freenode.net/selkie>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/rss-dev/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/