lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 2015-12-10 00:55, Coda Highland wrote:

Then I submit that your function would be better named "normalize"
than "validate" since its intent in the workflow is to provide you
with a safe, canonical form of the string, and it just also lets you
know if it encountered problems along the way.

The function does not play with normalization nor does not want to ``canonicalize'' strings. The simple process [ill-formed] => [well-formed] can be named validation, I think. I had in mind security reasons: for example SQL server does not close a string after it encountered some strange non-canonical coptic quote, but rather after it have seen "'" (0x27), which can be expressed in many ways (one well-formed and many ill-formed).

-- best regards

Cezary H. Noweta