dealing with encoding issues