fixed work with charsets