Moving encoding to curtitle function, to make it more generalized (also used by clip_again etc)