cleaner string/bytes solution, closes #4759
cleaner string/bytes solution, closes #4759

Thanks @takluyver for the suggestion. I'll eventually learn this
strings/bytes/unicode stuff properly for Python3.

ipython/ipython,ipython/ipython