[comp.binaries.ibm.pc.d] 8-bit chars in printing

zjdg11@hou.amoco.com (Jim Graham) (06/19/91)

In article <3257@krafla.rhi.hi.is> einari@rhi.hi.is (Einar Indridason) writes:

> Some products are great and works fine. BUT then there are those
> morons that *insist* on masking that bl*ody 8th bit!!

To avoid a repeat of the mistake made by the writer of aled (and yes, I see
it as a mistake....even w/in the U.S. --- after all, how many doc files use
8-bit characters just as themselves...quite a few that I've seen), I'd like
to pose a new question to the group.

I'm (eventually...as soon as I get more documentation into the code) going to
post a program to alt.sources that will use a reduced fontsize and
interlineskip, combined with subscripting to produce very small output on
Epson-flavored dot-matrix printers.  (On a Panasonic KX-P1124, which emulates
an Epson LQ-2500, after margins, it gets 105 lines/page, and 160 chars/line
in single column mode, or 77 chars/column in double-column mode.)  One of the
things I've been concerned about is how to handle printing 8-bit characters.

I *** WAS *** just planning on including the escape sequence required to tell
the printer how to do 8-bit chars in the config file.....  It's starting to 
sound as though that may not be the best solution, however.  If I do that,
will that work in conjunction with the device drivers, etc., used in other
countries that I've been reading about for the last few minutes?

Do printers in other countries already know how to handle these characters?
Is there even a need to tell the printer anything beyond the fact that the
8-bit character that's coming is a character, and not a control sequence?
If so, could that still be handled by sending a (perhaps different) escape
sequence ahead of the character?

When I do finally post this thing, my intent is to make it as adaptable as
I can...without requiring the person on the receiving end to have to modify
the code themselves to make it so.

I'm open for suggestions on the best way to handle this.  Please send via
e-mail, as I don't always (in fact, rarely do) get time to catch all of the 
articles in all of the groups I'm subscribed to, and could easily miss
responses to the net.  I'll post a followup if there is sufficient interest.

As I said, I am open to (constructive) suggestions....flames, however, if
someone feels the need, should simply be directed to /dev/null (if you don't,
I will).

Thanks in advance for your comments.....
   --jim

Standard disclaimer....These thoughts are mine, not my employer's.  Same
  applies to the program that I speak of....as far as I know, Amoco doesn't
  even know it exists (or care, for that matter).

------------------------------------------------------------------------------
Share and Enjoy!  (Sirius Cybernetics Corporation, complaints division)
73, de n5ial

Internet:  zjdg11@hou.amoco.com    or    grahj@gagme.chi.il.us
Amateur Radio:
   TCP/IP:    jim@n5ial.ampr.org (44.72.47.193)
   Packet:    BBS went QRT for good...still searching for new one.
------------------------------------------------------------------------------

einari@rhi.hi.is (Einar Indridason) (06/20/91)

In article <1991Jun18.172133.9891@hou.amoco.com> zjdg11@hou.amoco.com (Jim Graham) writes:
>I'm (eventually...as soon as I get more documentation into the code) going to
>post a program to alt.sources that will use a reduced fontsize and
>interlineskip, combined with subscripting to produce very small output on
>Epson-flavored dot-matrix printers.  (On a Panasonic KX-P1124, which emulates
>an Epson LQ-2500, after margins, it gets 105 lines/page, and 160 chars/line
>in single column mode, or 77 chars/column in double-column mode.)  One of the
>things I've been concerned about is how to handle printing 8-bit characters.

Humm.  I suppose that you are planning to define your own characters (on
the lower half) and down load them into the printer.  Your characters will
be smaller than the original?

Right?

Now about the 8-bit characters?
If my thought about redefinition, is correct, then I see one answer that
would really fit that program:
Make the 8-bit characters userdefinable, by using an external file or
something.  This file should contain the character matrixes for the 8bit
characters.

I have constructed the character matrixes (9x14) for IBM's codepage 850,
861 and ISO 8859/1 (upper half only)

Maybe they can help you.  Email for further info.

--
Internet:    einari@rhi.hi.is        |   "Just give me my command line and drag
UUCP:    ..!mcsun!isgate!rhi!einari  |   the GUIs to the waste basket!!!!"

Surgeon Generals warning:  Masking the 8th bit can seriously damage your brain!!

zjdg11@hou.amoco.com (Jim Graham) (06/22/91)

Tried to reply via e-mail, but it got bounced back...so......

In article <3285@krafla.rhi.hi.is> einari@rhi.hi.is (Einar Indridason) writes:
>In article <1991Jun18.172133.9891@hou.amoco.com> zjdg11@hou.amoco.com 
>(Jim Graham) writes:

>>I'm (eventually...as soon as I get more documentation into the code) going to
>>post a program to alt.sources that will use a reduced fontsize and
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
>>interlineskip, combined with subscripting to produce very small output on
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>Epson-flavored dot-matrix printers.

>Humm.  I suppose that you are planning to define your own characters (on
>the lower half) and down load them into the printer.  Your characters will
>be smaller than the original?
>
>Right?

nope.  it uses a combination of Elite and Compressed pitch, which makes for
small letters, subscript mode, which makes for REALLY small letters, and a
reduced interlineskip, which makes the rest of this mean something (after
all, what good does it do to use small letters if a ``line'' still takes up
the same amount of the page?  I intercept any CR/LF or LF and instead, send
the escape codes that generate a vertical skip of 18/180 inch.  THEN, I send
a CR to move the print head back to the left.

What I'm wondering about is the fact that printers (my printer, at least)
usually need to be told how to interpret 8-bit characters, since these are
also used for printer control codes and such.

My plans right now are just to treat this as any other escape sequence....if
it just so happens that you don't have the same type printer that I do, you
just use the configuration file to tell the program what your printer 
expects as a control sequence to tell it to do certain tasks.  I would include
something like

ESCAPE_8_BIT_CHARS  <escape sequence to do this>

Only problem is, from what I gathered from this thread, doing that may in
fact cause problems for a lot of people.  then again, it may be just the
thing they need it to do.  The source code will (obviously) be there, so
anyone that doesn't work for could hack around with it before compiling it,
but my intent is to not force people into that (beyond the obvious things
that you always have to do...edit the Makefile, config hdrs, etc.).

   --jim

Standard disclaimer....These thoughts are mine, not my employer's.

------------------------------------------------------------------------------
Share and Enjoy!  (Sirius Cybernetics Corporation, complaints division)
73, de n5ial

Internet:  zjdg11@hou.amoco.com    or    grahj@gagme.chi.il.us
Amateur Radio:
   TCP/IP:    jim@n5ial.ampr.org (44.72.47.193)
   Packet:    BBS went QRT for good...still searching for new one.
------------------------------------------------------------------------------