more checking of UTF errors

Overlong sequences, wrong continuation  for UTF-8.
Lone high surrogate for UTf-16/.