Security bug fix, some invalid UTF-8 sequences were accepted as valid
Authored by: artyom-beilis 2013-01-02
Parent: [r2227]
Child: [r2229]