queryparam measures maxlength based on character length instead of byte length, problem with that is that a "varchar(255)" is based byte length what of course can differ.
For that we need also an attribute "charset" that allows to define the target charset used for the column.
we also use the attribute charset to validate the string against that charset, so is the string compatible with that charset.
if charset is not set, it works the old way for backward compatibility.