convert: fix handling of dashless UTF prefix in validate_encoding()