A challenge to the ASCII proponents.

Alan Kennedy alanmk at hotmail.com
Sun Jul 20 10:16:48 EDT 2003


Alan Kennedy wrote:

>> One person, Bengt, said that he couldn't see it

Ben Finney wrote:

> This is identical to the justification of "$BIGNUM percent of our
> target users use browser $BROWSER, so we can ignore the rest and
> use methods only viewable by browser $BROWSER."

Hmm, I fail to see the connection here. Fair enough, I made a mistake
in structuring my original xml snippet. I didn't attempt to address
the fact there are still some browsers out there that don't do XML.
Bengt corrected that mistake by providing an HTML snippet that works
in
non-XML browsers as well, i.e. a superset of the set I covered. Given
the current market breakdown for browsers, I guesstimate that Bengt's
snippet worked for > 99.9% of recipients.

> Which quickly leads to "You must use $BROWSER to view this site". 
> No thanks.

No, that's the precise opposite of the point I was making. My position
is "You must use markup-capable software to perceive what I've
written. Your choice of software is entirely up to you: the only
requirement is the ability to process (x|ht)ml". I try to avoid
platform/language/os/browser dependent anything: that was the whole
point of the post.

> Provide a method that degrades gracefully to ASCII, the current
> standard; then I'll be interested.

#------------------------------------------------------------
snippet = """<?xml version="1.0" encoding="utf-8"?>
<verb>&#x3b3;&#x3af;&#x3b3;&#x3bd;&#x3c9;&#x3c3;&#x3ba;&#x3c9;</verb>
"""

def is7bitclean(s):
    for c in s:
        if ord(c) > 127:
            return 0
    return 1

if is7bitclean(snippet):
    print "Yep, it's clean."
else:
    print "Thou hast broken the rules."
#------------------------------------------------------------

Is that what you meant by "graceful degradation to ASCII"?

The 7-bit cleanness of my original snippet was the reason why it
arrived safely in everyone's "inbox".

Bengt's even-further-travelling HTML snippet is also 7-bit clean.

And if the message structures used in the protocol transporting the
messages were encoded in XML, you wouldn't even have seen any encoding
declarations or pointy brackets, or had to copy&paste.

--
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/mailto/alan




More information about the Python-list mailing list