Fix overly aggressive UTF-8 string validation

The serializer was stripping valid UTF-8 from input strings!