You said:

can I find a printable ASCII character that never appears in our big file?

If it happens to be true that the data values to be separated are all entirely in the ASCII range, why not just use a single-byte non-ASCII character as the delimiter -- e.g. 0xA0 "non-breaking-space", or if you want it to be visible, 0xA1 "inverted exclamation mark" or 0xB0 "degree mark" or ... (there are several nice candidates).

The situations where you might encounter a non-8-bit-clean process or channel are virtually non-existent these days.

For that matter, is it really entirely mandatory that the character be printable? It seems hard to imagine that making it "look nice" should be an important factor for a 2GB file. Who's going to be looking at it?


In reply to Re: Find what characters never appear by graff
in thread Find what characters never appear by Narveson

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.