Added constructor with charset settings
Updated using of validator