[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Binary versus Text

  • From: John Cowan <johnwcowan@gmail.com>
  • To: Rick Jelliffe <rjelliffe@allette.com.au>
  • Date: Tue, 26 Nov 2013 10:19:18 -0500

Re:  Binary versus Text



On Tue, Nov 26, 2013 at 9:37 AM, Rick Jelliffe <rjelliffe@allette.com.au> wrote:

I would say that a text file is one which, when sequentially read, has is a simple transformation from the bytes to a sequence of characters in one or more character repertoires (lists), fully consuming all bytes with none remaining, except any file-termination codes. This transformation may be direct mapping using the values of the bytes, or may involve mapping sequences of bytes to some other number  (e.g. UTF-8), or may involve a simple state machine (e.g. ISO 2022), for example, (but surely nothing requiring a stack or random access.)   The result and initial objective of parsing the file is a single sequence of characters.

You probably need to say something about BOMs.  But it's the last sentence that's critical: something is only text if we intend to consume it as text.
 
I would say that a binary file, when used in distinction to "text file", is one which uses potentially more complex transformations, where the result and initial objective of parsing the file will be a data structure or event stream.

That is, a data structure other than a string, and an event stream other than a stream of character events.
 
Something like that.

    The members of the English Church had ingenuously imagined up
    to that moment that it was possible to contain, in a frame of
    words, the subtle essence of their complicated doctrinal system,
    involving the mysteries of the Eternal and the Infinite on the
    one hand, and the elaborate adjustments of temporal government
    on the other. They did not understand that verbal definitions
    in such a case will only perform their functions so long as
    there is no dispute about the matters which they are intended
    to define: that is to say, so long as there is no need for
    them. For generations this had been the case with the Thirty-nine
    Articles. Their drift was clear enough; and nobody bothered over
    their exact meaning. But directly someone found it important to
    give them a new and untraditional interpretation, it appeared
    that they were a mass of ambiguity, and might be twisted into
    meaning very nearly anything that anybody liked.

        --Lytton Strachey, "Cardinal Manning"
--
GMail doesn't have rotating .sigs, but you can see mine at http://www.ccil.org/~cowan/signatures


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.