[Eric] Bug of Eric5

drizt drizt.ruan at gmail.com
Tue Mar 2 09:51:17 GMT 2010


--------------------------------------------------------------------------------
2010-03-02, 17:20:07
--------------------------------------------------------------------------------
<class 'ValueError'>: 
Can only set default encoding to utf-8
--------------------------------------------------------------------------------
  File "C:\Python31\Lib\site-packages\eric5\eric5.py", line 253, in
<module>
    main()
  File "C:\Python31\Lib\site-packages\eric5\eric5.py", line 212, in main
    sys.setappdefaultencoding(Preferences.getSystem("StringEncoding"))

--------------------------------------------------------------------------------
Version Numbers:
  Python 3.1.1
  Qt 4.6.1
  PyQt4 4.7
  sip 4.10
  QScintilla 2.4.2
  eric5 5.0-snapshot-20100206 (r107)

Platform: win32
3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit (Intel)]



After modified the eric5\Preference\__init__.py file, i can now run
eric5, but i am not sure if it is ok.

from 

    # defaults for system settings
    if isWindowsPlatform():
        sysDefaults = {
            "StringEncoding" : "cp1251",
            "IOEncoding"     : "cp1251",
        }
    else:
        sysDefaults = {
            "StringEncoding" : "utf-8",
            "IOEncoding"     : "utf-8",
        }

to
    # defaults for system settings
    if isWindowsPlatform():
        sysDefaults = {
            "StringEncoding" : "utf-8",
            "IOEncoding"     : "utf-8",
        }
    else:
        sysDefaults = {
            "StringEncoding" : "utf-8",
            "IOEncoding"     : "utf-8",
        }



					Regards,
					drizt.ruan




More information about the Eric mailing list