utf8 encoding issues with wrap script