Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^5: Native newline encoding

by BrowserUk (Pope)
on May 23, 2012 at 15:04 UTC ( #972050=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Native newline encoding
in thread Native newline encoding

So, you consider this "binary":

C:\test>od -t x1 Huawei.xml | head 0000000 0d 0a 0d 0a 0d 0a 0d 0a 3c 21 44 4f 43 54 59 50 0000020 45 20 48 54 4d 4c 20 50 55 42 4c 49 43 20 22 2d 0000040 2f 2f 57 33 43 2f 2f 44 54 44 20 48 54 4d 4c 20 0000060 34 2e 30 31 20 54 72 61 6e 73 69 74 69 6f 6e 61 0000100 6c 2f 2f 45 4e 22 20 22 68 74 74 70 3a 2f 2f 77 0000120 77 77 2e 77 33 2e 6f 72 67 2f 54 52 2f 68 74 6d 0000140 6c 34 2f 6c 6f 6f 73 65 2e 64 74 64 22 3e 0d 0a 0000160 3c 68 74 6d 6c 3e 0d 0a 3c 68 65 61 64 3e 0d 0a 0000200 3c 74 69 74 6c 65 3e e8 8f af e7 82 ba ef bc 8c 0000220 e8 8f af e7 82 ba e5 85 ac e5 8f b8 ef bc 8c e8 ...

Source


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


Comment on Re^5: Native newline encoding
Download Code
Re^6: Native newline encoding
by sauoq (Abbot) on May 23, 2012 at 21:38 UTC

    Without getting all epistemological, are you claiming it isn't?

    -sauoq
    "My two cents aren't worth a dime.";
      Without getting all epistemological, are you claiming it isn't?

      Yes. "Extensible Markup Language (XML) is a simple, very flexible text format ..."


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

        Yes.

        Well, that is simply incorrect. It's not incorrect to say it is a text format, of course. It's just incorrect to say that it isn't binary. Textual data is binary even if not all binary data is textual. I imagine you know this, but on computers,† even text is represented with two values.‡

        The only time drawing a distinction between text and binary data actually matters is when when working on a platform that was designed with the questionable choice to arbitrarily support two different sets of semantics.

        What you should learn from all the "unicrap" stuff is that text was just never a very meaningful term to begin with. It's only precise use is as an instruction to handle the data in a platform specific manner.

        Furthermore, on those platforms where it is meaningful, it's a relic from an era when the only data presented for human consumption was textual. Nowadays, that's just not the case; and the appropriate question is simply: "what format?" Is it an old word document? A spreadsheet? ASCII? ASCII with CRLF line endings? UTF-8? JPG data? Etc.

        † Almost all computers in use today, that is.

        ‡ Hence, even the term 'binary data' is generally redundant.

        -sauoq
        "My two cents aren't worth a dime.";

        Note that the passage you quoted does not appear anywhere in the spec.

        XML has aspects of a binary format. Specifically, the encoding can't be changed. That's why it must be passed to a parser undecoded and why it has the MIME type of a binary format (application/).

        It also has aspects of a text format. Specifically, the ability to be read and edited by humans with nothing but basic tools.

        Considering neither "text format" nor "binary format" are actually defined, it's silly to debate without first putting out definitions.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://972050]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-12-20 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls