Normalize the encoding names for Latin-1 and UTF-8 to
'latin-1' and 'utf-8'.
These are optimized in the Python Unicode implementation
to result in more direct processing, bypassing the codec
registry.
Also see issue11303.
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index fd5a863..8dce9ac 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -100,7 +100,7 @@
file = None
welcome = None
passiveserver = 1
- encoding = "latin1"
+ encoding = "latin-1"
# Initialization method (called by class instantiation).
# Initialize host to localhost, port to standard ftp port