accurate work with encoding