Skip to content
Browse files

bugfix for when locale.getpreferredencoding() is empty

  • Loading branch information...
1 parent fa94cef commit f9d6f41437c47dbe0b321882db1437b5e33e70d0 @amoffat committed
Showing with 3 additions and 1 deletion.
  1. +2 −0 CHANGELOG.md
  2. +1 −1 sh.py
View
2 CHANGELOG.md
@@ -2,6 +2,8 @@
## 1.07 - 11/21/12
+* Bugfix for PyDev when `locale.getpreferredencoding()` is empty.
+
* Fixes for IPython3 that involve `sh.<tab>` and `sh?`
* Added `_tee` special keyword argument to force stdout/stderr to store
View
2 sh.py
@@ -48,7 +48,7 @@
import time as _time
from locale import getpreferredencoding
-DEFAULT_ENCODING = getpreferredencoding()
+DEFAULT_ENCODING = getpreferredencoding() or "utf-8"
if IS_PY3:

0 comments on commit f9d6f41

Please sign in to comment.
Something went wrong with that request. Please try again.