Handle input strings with strange encodings
Set encoding for spec file