Checks for problematic encodings
()
| 4852 | logger.warning(warnMsg) |
| 4853 | |
| 4854 | def checkSystemEncoding(): |
| 4855 | """ |
| 4856 | Checks for problematic encodings |
| 4857 | """ |
| 4858 | |
| 4859 | if sys.getdefaultencoding() == "cp720": |
| 4860 | try: |
| 4861 | codecs.lookup("cp720") |
| 4862 | except LookupError: |
| 4863 | errMsg = "there is a known Python issue (#1616979) related " |
| 4864 | errMsg += "to support for charset 'cp720'. Please visit " |
| 4865 | errMsg += "'http://blog.oneortheother.info/tip/python-fix-cp720-encoding/index.html' " |
| 4866 | errMsg += "and follow the instructions to be able to fix it" |
| 4867 | logger.critical(errMsg) |
| 4868 | |
| 4869 | warnMsg = "temporary switching to charset 'cp1256'" |
| 4870 | logger.warning(warnMsg) |
| 4871 | |
| 4872 | _reload_module(sys) |
| 4873 | sys.setdefaultencoding("cp1256") |
| 4874 | |
| 4875 | def evaluateCode(code, variables=None): |
| 4876 | """ |
no test coverage detected
searching dependent graphs…