Using Internet File Formats on the QL
   By Timothy Swenson

Those of us in the QL world have not been totally immune from the
hype and lure of the Internet.  I've seen discussions of writing
Web browsers and network drivers for the QL.  Although it would
be interesting to browse the Internet on the QL, it is not the
platform that I am looking to use for my browsing.

Even without the ability to browse the web on the QL, just
getting information from the Internet to the QL or vice versa can
be very usefull.  Using a simple Unix Shell account from an
Internet Provider and Lynx, a text-only web browser, you can get
access to all kinds of information that can be brought to the QL
and used.

This article discusses the various formats used on the Internet
and how they can be handled on the QL and even how to create
files, on the QL, in these formats.  The point of the article is
that, even though  the QL does not have native capabilities to
use the Internet, it can still be usefull once you get the data
off the Internet.

Textual Formats

The written word is distrubuted on the Internet in a variety of
formats.  By the written word, I mean documents, papers, books,


ASCII text is the lowest common denominator when it comes to
computers sharing information.  ASCII is known as "pure ASCII
text", "pure text", "text file", and so on.  Since the QL
character set is a superset of ASCII, the QL can handle ASCII

The biggest problem is handling the End Of Line (EOL) marker.  On
the QL is is New Line (NL).  On the Mac it is Carriage Return
(CR).  In MS-DOS it is both CR and LF.  In Unix, it is just NL,
like the QL.  If you are using a communications program, it will
handle the EOL marker conversion for you.  If you are copying
files off a disk or transfering data in binary mode, you will
need to do the conversion yourself.  A number of text editors can
strip out CR's.  A simple program can be written to take out CR's
and/or add LF's.


HyperText Meta Language is really ASCII text with a number of
formatting commands and requires a viewer program to display and
print them.  There are two HTML viewers for the QL, QMOSAIC and
the one that comes with ProWess.  QMOSAIC is no longer being
developed and is limited in what it can do.  The ProWess browser
is new and still being developed and supported.

If you don't have an HTML viewer, you can get the information out
of the file by stripping out the HTML formatting commands.
striphtml_c is a C program that does this and was published in
the QL Hacker's Journal.  The data can then be read into QUILL
and made presentable.

Since HTML is pure text, you can create HTML documents on the QL
with any text editor.  The problem is that you have to know HTML
yourself.  In the PC and Mac world, there are programs that allow
a person that does not know HTML to create HTML documents.  A
popular program is the one that converts from Microsoft Word to
HTML.  I've seen it used and it produces some nice looking HTML

Learning HTML is not all that difficult.  There are only a
handfull of commands that are necessary for all HTML documents
and simple documents can be generated fairly easy.  There is a
dearth of books available on how to write in HTML.  Check your
local bookstore or library.


Postscript is really a display language that is used in printers.
It defines how a page will look, including text, pictures, lines,
etc.  It is considered an output format.  You can edit text and
HTML files, but you don't edit Postscript files.  Postscript is
what comes out of an application and is sent to a printer.

For many years if you wanted to distribute a document and keep
its look consistant, you would distribute it in Postscript
format.  The reciever of the file would send the file to a
Postscript printer and get an exact copy of the printed document.
The limitation for the reciever is that they could not edit the

Ghostscript is a freeware Postscript viewer that has been ported
to the QL.  It's not a simple or small program and requires
speed, memory, and some disk space.  It really needs a hard disk
or an ED disk drive to use it well.  It also requires a number of
font files, which can eat up disk space.  Once a document in read
into Ghostscript, it can them be printed to your printer.
Ghostscript supports the display of both text and graphics.  If
you have a picture done in Postscript, it can be viewed with

Without Ghostscript, Postscript files can be handled on the QL.
All text in Postscript is embedded in the file as text, it's just
intermixed with a large number of Postscript commands.  Text is
always surrounded by ()'s.  A simple Postscript text stripped can
be written to strip out just the text in the file.  This means
that any graphic information would be lost, including text done
in graphics (like very large letters).

As for creating output in postscript, there is a utility
nenscript (nens13_zip), a clone of the Adobe program encript,
which is a text to postscript converter.  Nenscript is written by
Craig Southern and ported to the QL by Jim Gilmour.  Version 1.3
is dated June 94.  I've never tried the program, so I can't say
much about it.

Adobe Acrobat

Adobe (the company that brought you Postscript) has come up with
a portable document format called Acrobat (.PDF).  Like
Postscipt, Acrobat files are display only and are not editable.
Like Postscript, Acrobat is designed to be portable across
platforms and ensures that the document looks exactly as it was

Viewing Acrobat files on the QL is going to be a problem, or so I
thought.  On Jonathan Hudson's web page he mentions that the
lastest version of Ghostscript can handle Acrobat files.  I was
surprized to hear this, but knowing Jonathan, if he says that it
does, it does.  I feel this a big breakthrough for the QL.
Acrobat is fast becoming THE format for distribuing documents.
HTML is ok for having formatted text, but each HTML viewer can
change how the final product looks.  Acrobat keeps your documents
looking exactly as you created them.  With Ghostscript, you can
view all PDF file you get off the Internet.  
Now creating Acrobat file on the QL, thats another thing.  The
program that creates Acrobat files is not avialable on the QL and
I know of no freeware verions available for any platform.

E-Mail Binary Files

E-mail is composed of only ASCII text, but a number of tricks
have been created to allow the sending of binary files through
e-mail.  All of these tricks involve converting these binary
files into an ASCII text file (in code), sending them through
e-mail, and then converting them back.  If you ever get a binary
file sent to you like this, and you don't have the tools to
convert it back, the data is of no use to you.


The original program to convert a binary file to ASCII is
UUENCODE and UUDECODE.  These programs were created on Unix
systems and are very popular in the Unix world.  These programs
work in conjuction with each other.  One converts binary to ASCII
(uuencode) and the other converts back (uudecode).

Once you get an e-mail with a uuencoded attachment, you edit out
all but the uuencoded part and then pass it through uudecode.  If
you want to send an e-mail message with a binary file attachment,
send the file through uuencode and then send the resultant file
via e-mail.  Some e-mail handlers only allow messages of up to a
certain size.  There is a program SPLIT that divides a file into
a number of files of X lines (where X can be 100, 200, and so

uuencode and uudecode come with the C68 distribution.  They may
come with the GNU text utilities distribution.


MIME is a newer format standard that works like uuencoding, but
it includes some intelligence about the original files.  If the
original file was a graphic file, MIME marks it as such when it
converts it.  Then at the recieving end, a MIME-compatible
program will know it is a graphic file and fire off a graphics
program to display the file.  MIME is designed to handle
graphics, sounds, motion files, etc.

Jonathan Hudson has ported over a few MIME utilties.  They allow
you to read and create MIME encoded files.  I have not played
with the utilites, so I can't say much more than this.

E-Mail Digital Signatures


Digitally signing e-mail and documents is getting to be fairly
popular on the Internet.  Software distributions, security
announcements, and other "official" file are being signed using a
program called Pretty Good Privacy (PGP).  If you want to verify
a digital signature or stamp one of your own, you will need PGP.
PGP is available for the QL and as reviewed in a previous issue
of QL Today.

Binary Archives

File archivers are ways of joining a number of files into one
file, for easier downloading and distribution.


The ZIP format created for the PKZIP and PKUNZIP (.ZIP) utilities
is the main archiver and compression program for all PC based
files.  Since it is very well known, I won't discuss it much
here.  There are a number QL utilities that both ZIPing and
unZIPing.  ZIP and InfoZIP are the two that I know of.  Both work
well and will handle any ZIP file.


The GNU folks have come up with their own version of a archiver
and compresser called GNU ZIP or GZIP.  GZIP is very popular in
the Unix world.  GZIP files end with a .GZ extension.  GZIP uses
a different ZIPing format than PKUNZIP, but I believe it can read
and write ZIP files.  I've only used ZGIP on .GZ files, so I
can't say that I'm correct on this.  GZIP has been ported to the
QL from the Unix source.  The QL version of GZIP will both read
and write .GZ files.


Another Unix file format is a TAR file. TAR is short for Tape
ARchive.  It does not compress files so much as it puts a bunch
of files in one big file.  TAR is used to distribute software and
is used in conjuction with GZIP and with Compress.  Compress the
original Unix compression program.  Its files end with .Z.  You
will often see files that end in .TAR.Z or .TAR.GZ.  These are
TAR files that have been compressed with Compress and GZIP.  TAR
has been ported to the QL and will both read and write .TAR
files.  I don't believe Compress has been ported to the QL (at
least the Unix compatible version).  If you are getting a .TAR
file, get the one that ends with .GZ.

Graphic Files

In the early years of home computers, each computer had a
different way of storing graphics.  Most computers could save a
graphic image to tape or disk.  Getting graphics from one
computer make to another was almost impossible.  Then came the
standard graphic formats.


RLE is probably the very first standard graphics file format.
RLE stands for Run Length Encoded, which is how the graphics werestored.  RLE only supported black and white graphics.  Using RLE
a picture could be created on a Commodore 64 and displayed on an
Apple II.  RLE is over 10 years old and has not been popular
since the late 80's.  If you run into some older archives you may
run into an RLE file.  Many years ago an RLE viewer was written
for the QL.  I used to use it sometimes.  In fact my first QL to
QL modem transfer was of a couple of RLE files.


GIF was a portable color graphic file format created by
CompuServe.  Once introduced, it took a few years to become
popular.  From the late 80's until the mid-90's it was the
predominate graphic file format.  It is still very popular and is
used heavily on web pages.  Most of the small graphics you see on
web pages are GIF images.  GIF had compression built into the
file format, so it is a fairly economical way of storing images.
A number of GIF viewers have been written for the QL.  I know
that both UNGIF and GIFVIEW are available in distribution.  If
you are creating images you want to post to the Internet, ENGIF
will take a QL screen file and convert it to a GIF file.  Since
GIF files can handle up to 256 colors, don't expect many of the
newer GIF images to look all that good on a QL.


JPEG is the most popular format for images on the Web.  If you go
to a site that displays full images (takes up the whole screen),
odds are you are looking at a JPEG file (.JPG).  JPEG is supposed
to be better than GIF and have a better compression ratio.  I
know of one freeware program that allows you to convert to and
from JPEG format, but I don't believe it handles QL screen (_SCR)
formats.  There are some commercial programs, like OpenWorld,
that handle a number of graphic formats including JPEG.  They
would allow you to both create and view JPEG files on the QL.

Sound & Movies

Now we enter an area of file formats that the QL is not yet able
to handle.  


The two primary sound file formats are .WAV and .AU.  For PC's,
using these formats require the use of a sound card.  I have seen
a program that will play .AU files out the standard PC speaker,
but it is very limited and rather "tinny" sounding.  I can see a
program being written for the QXL or QPC that will handle these
formats, but I can't see it yet for the standard QL.


The primary movie formats are .MOV, MPEG (.MPG), .AVI (Microsoft
created) and .QT (Apple QuickTime).  All of these formats require
a fairly good resolution (VGA or better), a fair amount of color,
and lots of processor time.  Most of these movie files can be
from 100K to 1 Meg in size.  A five second AVI file can be about

Until there are some better resolution hardware for the QL, I
don't see much need to write or port any movie software to the


Let's say that you have only a QL with a modem and Internet
access.  Using a text web browser like LYNX, a gopher browser, or
even just plain FTP, you can download a number of different files
off the Internet and use them on the QL.  You can even take your
QL files and put them in "standard" file formats and upload to
the Internet.  Doing all of this may not be as easy as having a
PC or Mac, but it can be done.


               (                   (