closingpunct() was testing the LS byte of the Rune rather than utf8 when looking for known punctionation chars. Reference: /n/sources/patch/applied/htmlfmt-whitespace Date: Wed Sep 19 13:14:21 CES 2007 Signed-off-by: steve@quintile.net --- /sys/src/cmd/htmlfmt/html.c Wed Sep 19 13:12:50 2007 +++ /sys/src/cmd/htmlfmt/html.c Wed Sep 19 13:12:47 2007 @@ -52,7 +52,7 @@ } int -closingpunct(int c) +closingpunct(char c) { return strchr(".,:;'\")]}>!?", c) != nil; } @@ -66,7 +66,7 @@ if(nr == 0) return; s = smprint("%.*S", nr, r); - space = (b->n>0) && !isspace(b->b[b->n-1]) && !closingpunct(r[0]); + space = (b->n>0) && !isspace(b->b[b->n-1]) && !closingpunct(*s); if(col>0 && col+space+nr > width){ growbytes(b, "\n", 1); space = 0;