diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index f551fd4..b3ebcd2 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -239,7 +239,7 @@ class TerminalInteractiveShell(InteractiveShell): # Ignore blank lines and consecutive duplicates cell = cell.rstrip() if cell and (cell != last_cell): - history.append(cell) + history.append(cast_unicode_py2(cell)) last_cell = cell self._style = self._make_style_from_name_or_cls(self.highlighting_style)