User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.0) Gecko/20020529
Martin Duerst wrote:
If a protocol restricts itself to UTF-8, then it's not the parser,
but the application, that must enforce the restriction.
Which is actually nontrivial and there's no standardized way to do it if
you're using a standard XML processor. I believe you can tell expat
that it has to try to use a particular encoding and catch the error
condition when this doesn't work, but it's going to be very difficult to
distinguish between an instance that is in a forbidden encoding from one
that actually has broken syntax. -Tim