[pypy-commit] pyrepl default: Port 3447616508ea from the pypy repo:

arigo noreply at buildbot.pypy.org
Fri Aug 19 13:43:51 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r125:6a98b8012b1e
Date: 2011-08-19 13:48 +0200
http://bitbucket.org/pypy/pyrepl/changeset/6a98b8012b1e/

Log:	Port 3447616508ea from the pypy repo:

	 Fix the most common case by trying to use
	sys.getfilesystemencoding() instead of the hard-coded 'latin1'
	encoding.

diff --git a/pyrepl/readline.py b/pyrepl/readline.py
--- a/pyrepl/readline.py
+++ b/pyrepl/readline.py
@@ -33,7 +33,7 @@
 from pyrepl.unix_console import UnixConsole, _error
 
 
-ENCODING = 'latin1'     # XXX hard-coded
+ENCODING = sys.getfilesystemencoding() or 'latin1'     # XXX review
 
 __all__ = ['add_history',
            'clear_history',


More information about the pypy-commit mailing list