Charset input escape


A question for advanced users.

Do you use to sanitize user input from incompatible char in the used chartset? for example, if your application use utf8 encoding, when a form is submitted, do you sanitize every input from unexpeted bytes?

How do you handle this with cakephp? Cake does not have a sanitize layer such as validation. Maybe the only place to sanitize input is the beforeMarshall event.

Another option is to add a validation rule on all input (table or modelless forms).

What do you think about this problem?