ASCII table tricks

Edward J. Groth 609-258-4361 groth at pupgg.princeton.edu
Sat Aug 31 10:10:51 EDT 1996


In article <5079np$ae7 at darkstar.ucsc.edu>, sla at umbra.ucolick.org (Steve Allen) writes:
>In article <199608301312.JAA06260 at tetra.gsfc.nasa.gov>,
>William Pence  <pence at tetra.gsfc.nasa.gov> wrote:
>>Steve Allen wrote:
>>> 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.
>
>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.
>
>--
>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



Well, the standards writers certainly never intended that one
play tricks and we certainly don't need people to look for
loopholes and take advantage of them.


I point out that the newline character is a line feed only on
Unix.

On Macs it's a carriage return.

On PCs it's a carriage return and a line feed.

On VMS it can be any of the above as well as other formats.



Are you prepared to deal with the following?

PC user ftp's table, messes around with it, uploads a new version
and all of a sudden your software croaks because there are now
carriage returns as well as line feeds where they used to be only
line feeds and all the positions of the fields are off????

					- Ed


/----------------------------------------------------------------------\
| Edward J. Groth            | Phone: 609-258-4361   Fax: 609-258-6853 |
| Physics Dept., Jadwin Hall | URL: http://pupgg.princeton.edu/~groth/ |
| Princeton University       | SPAN/HEPNET:  PUPGG::GROTH=44117::GROTH |
| Princeton, NJ 08544        | Internet:     groth at pupgg.princeton.edu |
\----------------------------------------------------------------------/




More information about the fitsbits mailing list