Added support of encoding validaton
Authored by: artyom-beilis 2010-12-29
Parent: [r1601]
Child: [r1603]