Postscript printer question

Tim Writer tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org
Tue Mar 14 15:13:15 UTC 2006


lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org (Lennart Sorensen) writes:

> On Mon, Mar 13, 2006 at 07:52:40PM -0500, Tim Writer wrote:
> > The PostScript Red Book has this to say:
> > 
> >     A hexadecimal string consists of a sequence of hexadecimal
> >     digits (09 and either AF or af) enclosed within < and >. Each
> >     pair of hexadecimal digits defines one character of the
> >     string. White-space characters are ignored. If a hexadecimal
> >     string contains characters outside the allowed character set,
> >     a syntaxerror occurs.  Hexadecimal strings are useful for
> >     including arbitrary binary data as literal text.
> > 
> > So, while this is legal behaviour on the part of OOo, I would argue that it
> > departs from the intent as your example uses plain text.
> > 
> > In case you decide to implement a scanner, be aware of this:
> > 
> >     If the final digit of a given hexadecimal string is missing in
> >     other words, if there is an odd number of digits, the final
> >     digit is assumed to be 0. For example, <901fa3> is a
> >     3-character string containing the characters whose hexadecimal
> >     codes are 90, 1f, and a3, but <901fa> is a 3-character string
> >     containing the characters whose hexadecimal codes are 90, 1f,
> >     and a0.
> > 
> > There's no reason for OOo to escape ~ as, according to the Red Book, only
> > (, ), <, >, [, ], {, }, /, and % are special. Having said that, PostScript
> > uses <~ and ~> as delimiters for base 85 strings.
> 
> Well it just appears that OOo has implemented things as 'encode
> everything as hex'.  It isn't just escaping ~, it is escaping
> everything.  I suspect it really is just a case of doing one thing for
> everything rather than having a special case for ascii characters.

Yes, I realize that. My point was that the designers of PostScript (at least
those who wrote the Red Book) clearly intended that plain text strings be
written using "(" and ")" for readability. As a programmer, I recognize that
using "<" and ">" for everything is umambiguous and easier to implement.

Regarding "~", I was referring to a comment by an earlier poster which said
that it was special. According to the Red Book, it's only special when it
follows "<".

> > It could be as simple as playing with your LANG or LOCALE environment
> > variables.
> 
> I doubt it.  I tend to run with LANG=C and usually no LOCALE setting.

I thought as much but it was worth a try.

-- 
tim writer <tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org>                                  starnix inc.
647.722.5301                                      toronto, ontario, canada
http://www.starnix.com              professional linux services & products
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list