Added encoding attribute to StringIO buffer for IPython pager