On 2005-06-15 19:51:26 +0200, Heiko Oberdiek wrote:
It mixes escaping for PDF *strings* with escaping for PDF *names*. '(', ')', '\\' are escaped for PDF strings, control characters are escaped for PDF names.
Thus I suggest to change the control character escaping from hexadecimal #xx to octal \ooo:
sprintf (buf, "\\%03o", (unsigned int)(unsigned char)in[i]); out[j++] = buf[0]; out[j++] = buf[1]; out[j++] = buf[2]; out[j++] = buf[3];
Then \pdfescapestring could be used for conversions to pdf strings.
Also a \pdfescapename / convertStringToPDFName is useful. Here especially the delimiter characters must be escaped in the #xx manner.
Thanks, will do. Best regards Martin -- http://www.tm.oneiros.de