$encoded =
mb_convert_encoding($value, 'UTF-8', 'Windows-1252'
);
} if ($this->
isValid($encoded)) { return $this->charValue
[$encoded];
} if ($this->
isNullType($encoded)) { return self::C_NUL;
} if ($this->
isInvalidChar($encoded)) { $this->hasInvalidTokens = true;
return self::INVALID;
} return self::GENERIC;
} protected function isValid(string
$value): bool
{ return isset($this->charValue
[$value]);
}