From 5f064841372bff68992200546607acb8542a6ed0 2012-08-27 06:03:32 From: Jörgen Stenarson Date: 2012-08-27 06:03:32 Subject: [PATCH] some fixes to call colorize with unicode from oinspect --- diff --git a/IPython/core/oinspect.py b/IPython/core/oinspect.py index 4c9a8fb..a9d0935 100644 --- a/IPython/core/oinspect.py +++ b/IPython/core/oinspect.py @@ -457,7 +457,7 @@ class Inspector: # Print only text files, not extension binaries. Note that # getsourcelines returns lineno with 1-offset and page() uses # 0-offset, so we must adjust. - page.page(self.format(open(ofile).read()), lineno-1) + page.page(self.format(io.source_to_unicode(open(ofile).read())), lineno-1) def _format_fields(self, fields, title_width=12): """Formats a list of fields for display.