Acme win hangs when I cat a file containing bad UTF sequences. Sample file (runeerrors.txt) included. Fixed pendingS calculation. Terminal partial runes, if any, are actually Runeerrors and shouldn't be ignored using utfnlen(). Thanks. Arvindh Reference: /n/sources/patch/applied/win-pending-s Date: Fri Apr 14 00:09:12 CES 2006 Signed-off-by: arvindht@gmail.com --- /acme/bin/source/win/main.c Fri Apr 14 00:08:44 2006 +++ /acme/bin/source/win/main.c Fri Apr 14 00:08:35 2006 @@ -436,7 +436,7 @@ sprint(tmp, "#%lud", hostpt); winsetaddr(w, tmp, 0); write(w->data, e->b, e->nb); - pendingS += utfnlen(e->b, e->nb); + pendingS += e->nr; break; case 'E': /* write to tag or body; body happens due to sendit */