Subject: ASCII table tricks

From: sla at umbra.ucolick.org (Steve Allen)
Date: 28 Aug 1996 21:17:20 GMT

>From the ASCII tables definition it appears that it would be possible
to make a table which is truly human-readable by naive tools.

Say that the table is written with 1-column gaps between the fields
that contain the character '|', and that there is an extra column
after the last field which contains an ASCII newline character.
In this case the table would automatically appear on screen in a
very presentable fashion.

Or the gaps between fields could be multiple-character strings
guaranteed not to occur in the body of any of the fields, and the
end-of-row could be multiple characters (to make even DOS happy).  In
this case the data unit of the ASCII table could also conform exactly
to the input format required by some database table dump/load tools.

Furthermore, data unit of this kind of table would be relatively
simple to edit using many text editors.  The characters in the gaps
would make it quite straightforward to preserve the structure.

Does the standard permit this, or did I miss some constraint?

Is anyone writing FITS ASCII tables with these intents?
--
Steve Allen          UCO/Lick Observatory       Santa Cruz, CA 95064
sla at ucolick.org      Voice: +1 408 459 3046     FAX: +1 408 454 9863
WWW: http://www.ucolick.org/~sla                PGP public keys:  see WWW

---

From: Lucio Chiappetti <lucio at ifctr.mi.cnr.it>
Date: Fri, 30 Aug 1996 09:31:13 +0200 (MET DST)

> to make a table which is truly human-readable by naive tools.
  ...
> Is anyone writing FITS ASCII tables with these intents?

  Is anyone using FITS ASCII tables at all  nowadays, or not only
  BINTABLEs ?
                                                  LC

---

From: William Pence <pence at tetra.gsfc.nasa.gov>
Date: Fri, 30 Aug 1996 09:12:07 -0400

...
> Does the standard permit this, or did I miss some constraint?

The FITS Standard does not allow the ASCII newline character or any
other ASCII control characters in an ASCII table.  Section 8.1.5 states
that "All data in an ASCII tables extension record shall be ASCII text ..."
and "ASCII text" is defined to be the ASCII characters hexidecimal 20-7E.

-Bill Pence
 NASA/GSFC

---

From: sla at umbra.ucolick.org (Steve Allen)
Date: 30 Aug 1996 17:51:53 GMT

In article <199608301312.JAA06260 at tetra.gsfc.nasa.gov>,
>and "ASCII text" is defined to be the ASCII characters hexidecimal 20-7E.

But wait, playing standards lawyer for a moment I point out that
section 8.1.5 is about "entries" in the table.

In section 8.1.3 it states
  "The table is constructed from a two-dimensional array of ASCII characters."
which means anything in 7-bit ASCII.

I believe the standard is saying that the data fields themselves may
only contain printable text, but that portions of the table outside
the fields may contain other ASCII charcters.

In particular, I believe this permits the tricks I suggested.

If this is not what the standards writers intended then the
language of section 8.1.3 needs clarification.