36ce136 add utf-8 encoding back, add encoding detection, and fix deploy script