RE: When to validate?

From: Carl W. Brown (cbrown@xnetinc.com)
Date: Fri Dec 10 2004 - 10:36:26 CST

  • Next message: Carl W. Brown: "Software support costs (was: Nicest UTF"

    Jill,

    I think that the best practice is to validate input.

    Besides the overhead of revalidating there is the issue of what do you do
    with data that contains invalid characters. This has to be handles
    explicitly. Once validated all transforms should maintain valid data. If
    you also provide a modified strncpy function that returns a length instead
    of a pointer and only copies complete code points in whatever UTF you are
    using you should not break the validity.

    Carl



    This archive was generated by hypermail 2.1.5 : Fri Dec 10 2004 - 10:37:48 CST