Small encoding bug fix for ipython repl

Small encoding bug fix for ipython repl