On Thu, Jun 23, 2005 at 11:21:55AM +0200, Pawel Jackowski wrote:
Hi Heiko,
what is the reason to escape spaces and newlines in \pdfescapestring?
\def\mystr{A B^^JC} \tt %\pdfescapename{\mystr} % this is obsious \pdfescapestring{\mystr} % ? \end
Following the specification there is no reason, it says,
"any 8-bit value may appear in a string".
However: '\', '(', and ')' _must_ be escaped.
Thus we can save space by only escaping the "must" characters.
But I am not feeling too well with this extreme.
\pdfescapename and \pdfescapestring are useful for PostScript, too.
Here the strings are passed through \special, dvips and the
PostScript-Interpreter. Are you sure, that nothing happens with
control characters, eg. newlines <LF> recoded as <CR><LF>, ...?
Perhaps the 8-bit characters can be output directly, here
I am not sure, if the 7-bit-safety here is just paranoia.
In case of names:
* Some characters such as delimiters and '#' _must_ be
escaped.
* Others, such as control and 8-bit characters are
recommended for escaping.
Thus \pdfescapename follows the recommendation.
Yours sincerely
Heiko