Encoding issues when moving code