fixed ascii encoding bug in the field validation