Browse Source

Py3: Incorrect warning about not being UTF-8

pull/1253/head
Safihre 6 years ago
parent
commit
24c7707fc0
  1. 7
      SABnzbd.py

7
SABnzbd.py

@ -50,6 +50,7 @@ except ValueError:
except ImportError: except ImportError:
print("Not all required Python modules are available, please check requirements.txt.") print("Not all required Python modules are available, please check requirements.txt.")
sys.exit(1) sys.exit(1)
import sabnzbd import sabnzbd
import sabnzbd.lang import sabnzbd.lang
import sabnzbd.interface import sabnzbd.interface
@ -1121,12 +1122,12 @@ def main():
logging.info('Python-version = %s', sys.version) logging.info('Python-version = %s', sys.version)
logging.info('Arguments = %s', sabnzbd.CMDLINE) logging.info('Arguments = %s', sabnzbd.CMDLINE)
# Find encoding; relevant for unrar activities # Find encoding; relevant for external processing activities
logging.info('Preferred encoding = %s', sabnzbd.encoding.CODEPAGE) logging.info('Preferred encoding = %s', sabnzbd.encoding.CODEPAGE)
# On Linux/FreeBSD/Unix "UTF-8" is strongly, strongly adviced: # On Linux/FreeBSD/Unix "UTF-8" is strongly, strongly adviced:
if not sabnzbd.WIN32 and not sabnzbd.DARWIN and not ('utf' in sabnzbd.encoding.CODEPAGE and '8' in sabnzbd.encoding.CODEPAGE): if not sabnzbd.WIN32 and not sabnzbd.DARWIN and not ('utf-8' in sabnzbd.encoding.CODEPAGE.lower()):
logging.warning(T("SABnzbd was started with encoding %s, this should be UTF-8. Expect problems with Unicoded file and directory names in downloads.") % sys.stdin.encoding) logging.warning(T("SABnzbd was started with encoding %s, this should be UTF-8. Expect problems with Unicoded file and directory names in downloads.") % sabnzbd.encoding.CODEPAGE)
# SSL Information # SSL Information
logging.info("SSL version = %s", ssl.OPENSSL_VERSION) logging.info("SSL version = %s", ssl.OPENSSL_VERSION)

Loading…
Cancel
Save