Handel unicode encoder errors