gbrandonp/ipython — comment on commit 46f0435d169263eea55060f011bb4bae50c988d3
File: IPython/core/splitinput.py line 56
By takluyver:

Note that this isn't quite the same. In some situations, sys.stdin.encoding can exist but be None. But this logic might be better inside the cast_unicode function itself.