''[Pat Thoyts] wrote in [the comp.lang.tcl newsgroup]:'' I found out about yenc encoding ... and it's not the same as uuencoding. Hopefully you are not trying to decode yenc data using the uuencode/uudecode code :) If you want a tcl yenc decoder I'm going to add one to [tcllib]'s [base64] module shortly. In the meantime here is the core of this method: namespace eval yencode {} ;# added by RS proc yencode::yEncode {s} { set r {} binary scan $s c* d foreach {c} $d { set v [expr {($c + 42) % 256}] if {$v == 0x00 || $v == 0x09 || $v == 0x0A || $v == 0x0D || $v == 0x3D} { append r "=" set v [expr {($v + 42) % 256}] } append r [format %c $v] } return $r } proc yencode::yDecode {s} { set r {} set esc 0 binary scan $s c* d foreach c $d { if {$c == 61 && $esc == 0} { set esc 1 continue } set v [expr {($c - 42) % 256}] if {$esc} { set v [expr {($v - 42) % 256}] set esc 0 } append r [format %c $v] } return $r } ---- [Arts and crafts of Tcl-Tk programming]