make sure encoding right