I get different values for sys.getdefaultencoding in Spyder than when I run the same Python in other ways. It seems that similar behavior was recently removed from PyDev <https://sw-brainwy.rhcloud.com/tracker/PyDev/315>.
I'm running Spyder on a Mac. I installed it via Anaconda. Within Spyder, from a standard Python interpreter accessed via the or from an iPython console, my default encoding is UTF-8: Python 2.7.6 |Anaconda 1.8.0 (x86_64)| (default, Jan 10 2014, 11:23:15) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. Imported NumPy 1.7.1, SciPy 0.13.0, Matplotlib 1.3.1 Type "scientific" for more details. >>> import sys >>> sys.getdefaultencoding() 'UTF-8' >>> but when I run what seems to be the same Python from the command prompt, I get: Python 2.7.6 |Anaconda 1.8.0 (x86_64)| (default, Jan 10 2014, 11:23:15) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.getdefaultencoding() 'ascii' This caused an error that was fairly difficult to debug. Can I make Spyder respect the system's default encoding, or otherwise force the two to be the same? Here <https://groups.google.com/forum/#!searchin/spyderlib/getdefaultencoding/spyderlib/v5ELu04_DXU/8DThvxoYMZkJ>'s some related discussion that didn't quite answer the question for me. Here <http://www.ianbicking.org/illusive-setdefaultencoding.html> is someone describing how difficult it is to change Python's default encoding. -- You received this message because you are subscribed to the Google Groups "spyder" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/spyderlib. For more options, visit https://groups.google.com/d/optout.
