Evaluated proc cgetchar {mmap x y} { set out [list]; set line [lindex $mmap $y]; set c 0; foreach chunk $line { if { $x >= $c && $x <= [+ $c [string length [lindex $chunk 2]]] } { set res [string index [lindex $chunk 2] [- $x $c]]; append out $res; if { [string length $res] > 0 } {return $res  } }; incr c [string length [lindex $chunk 2]] };. $out }