Permalink
Browse files

catch another unconditional encode in completerlib

closes gh-440
  • Loading branch information...
1 parent 8f78aed commit f519f17fbfbfe606311390d413e6459c323d3404 @minrk committed Jun 28, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 IPython/core/completerlib.py
@@ -68,7 +68,8 @@ def shlex_split(x):
# shlex.split has unicode bugs, so encode first to str
if isinstance(x, unicode):
- x = x.encode(sys.stdin.encoding)
+ # don't raise errors on encoding:
+ x = x.encode(sys.stdin.encoding or sys.getdefaultencoding(), 'replace')
endofline = []
while x != '':

0 comments on commit f519f17

Please sign in to comment.