nsmcp::SmtpLogTool method decode (protected)

 <instance of nsmcp::SmtpLogTool[i]> decode value

Defined in /usr/local/ns/tcl/nsmcp/smtp-tools.tcl

Event writer escapes bytes as \\xHH. Decode without evaluating Tcl.

Parameters:
value (required)

Testcases:
No testcase defined.
Source code:
set decoded ""
while {[regexp -indices {\\x[0-9a-fA-F]{2}} $value match]} {
    lassign $match first last
    append decoded [string range $value 0 $first-1]  [format %c [scan [string range $value $first+2 $last] %x]]
    set value [string range $value $last+1 end]
}
return $decoded$value
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: