directly force_encoding is wrong, must detect the file string's encoding. then force_encoding the string to it's encoding. last convert it to utf-8.