significant bit set (so-called &"8-bit characters"&) count as printing or not
is controlled by the &%print_topbitchars%& option.
+.new
+.vitem &*${escape8bit:*&<&'string'&>&*}*&
+.cindex "expansion" "escaping 8-bit characters"
+.cindex "&%escape8bit%& expansion item"
+If the string contains and characters with the most significant bit set,
+they are converted to escape sequences starting with a backslash.
+Backslashes and DEL characters are also converted.
+.wen
+
.vitem &*${eval:*&<&'string'&>&*}*&&~and&~&*${eval10:*&<&'string'&>&*}*&
.cindex "expansion" "expression evaluation"
8. LMDB lookup support, as Experimental. Patch supplied by Andrew Colin Kissa.
+ 9. Expansion operator escape8bit, like escape but not touching newline etc..
+
Version 4.87
------------
US"base64d",
US"domain",
US"escape",
+ US"escape8bit",
US"eval",
US"eval10",
US"expand",
EOP_BASE64D,
EOP_DOMAIN,
EOP_ESCAPE,
+ EOP_ESCAPE8BIT,
EOP_EVAL,
EOP_EVAL10,
EOP_EXPAND,
case EOP_ESCAPE:
{
- const uschar *t = string_printing(sub);
+ const uschar * t = string_printing(sub);
yield = string_cat(yield, &size, &ptr, t);
continue;
}
+ case EOP_ESCAPE8BIT:
+ {
+ const uschar * s = sub;
+ uschar c;
+
+ for (s = sub; c = *s; s++)
+ yield = c < 127 && c != '\\'
+ ? string_catn(yield, &size, &ptr, s, 1)
+ : string_catn(yield, &size, &ptr, string_sprintf("\\%03o", c), 4);
+ continue;
+ }
+
/* Handle numeric expression evaluation */
case EOP_EVAL:
xyz@abc, nullgroupname:;, group: p@q, r@s; }
addresses: ${addresses:local-part@dom.ain <local-part@dom.ain>}
-escape: ${escape:B7·F2ò}
+escape: ${escape:B7·F2ò}
+excape8bit: ${escape8bit:undisturbed text\ttab\nnewline\ttab\\backslash \176tilde\177DEL\200\x81.}
+
eval: ${eval:1+1}
eval: ${eval:1+2*3}
eval: ${eval:(1+2)*3}
> addresses: local-part@dom.ain:xyz@abc:p@q:r@s
> addresses:
>
-> escape: B7\267F2\362
+> escape: B7\267F2\362
+> excape8bit: undisturbed text tab
+newline tab\134backslash ~tilde\177DEL\200\201.
+>
> eval: 2
> eval: 7
> eval: 9