Replace non-encodable characters when encoding to latin-1