in reply to Metadata and the EOF marker

I'm sure that chr(26) as a marker is what is called for. A file format can be parsed on any os, so the standard should be followed.

Interestingly, perl follows the same convention. A perl script can include metadata following a ^D or ^Z (chr(4) or chr(26)) which marks the end of the script. Nobody uses that much, because __DATA__ and __END__ do the same thing much more printably, hence readably. See perldata for details.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: Metadata and the EOF marker
by sauoq (Abbot) on Sep 04, 2002 at 17:37 UTC
    I'm sure that chr(26) as a marker is what is called for. A file format can be parsed on any os, so the standard should be followed.

    I do agree with this statement but if you take a look at the specification to which LTjake linked, it makes the claim, "In reality, we'll be adding SAUCE to every file you can imagine."

    As it requires the SAUCE data to come after the chr(26), presumably it is trying to succeed in its claim by hiding itself after the normal end of file. So, for instance, you might dump some SAUCE at the end of some config file you have without every worrying that the program is going to mistakenly read your SAUCE as part of the configuration. That breaks on Unix. I think that's what Abigail meant by saying it wasn't portable.

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