unicode and StringIO compat for sphinxext