fixed encoding utils. missed several places where UTF-8 needed to be expicit