[PATCH] Handle UTF-8 more robustly; pass through information about incorrect sequences