diff --git a/src/calibre/gui2/convert/look_and_feel.ui b/src/calibre/gui2/convert/look_and_feel.ui
index 367233e2c0..0edc324dc5 100644
--- a/src/calibre/gui2/convert/look_and_feel.ui
+++ b/src/calibre/gui2/convert/look_and_feel.ui
@@ -127,9 +127,6 @@
- -
-
-
-
@@ -244,8 +241,22 @@
+ -
+
+
+ true
+
+
+
+
+
+ EncodingComboBox
+ QComboBox
+
+
+
diff --git a/src/calibre/gui2/widgets.py b/src/calibre/gui2/widgets.py
index bc3c23876f..d87bb45f7a 100644
--- a/src/calibre/gui2/widgets.py
+++ b/src/calibre/gui2/widgets.py
@@ -616,6 +616,31 @@ class ComboBoxWithHelp(QComboBox):
QComboBox.hidePopup(self)
self.set_state()
+
+class EncodingComboBox(QComboBox):
+ '''
+ A combobox that holds text encodings support
+ by Python. This is only populated with the most
+ common and standard encodings. There is no good
+ way to programatically list all supported encodings
+ using encodings.aliases.aliases.keys(). It
+ will not work.
+ '''
+
+ ENCODINGS = ['', 'cp1252', 'latin1', 'utf-8', '', 'ascii', 'big5', 'cp1250', 'cp1251', 'cp1253',
+ 'cp1254', 'cp1255', 'cp1256', 'euc_jp', 'euc_kr', 'gb2312', 'gb18030',
+ 'hz', 'iso2022_jp', 'iso2022_kr', 'iso8859_5', 'shift_jis',
+ ]
+
+ def __init__(self, parent=None):
+ QComboBox.__init__(self, parent)
+ self.setEditable(True)
+ self.setLineEdit(EnLineEdit(self))
+
+ for item in self.ENCODINGS:
+ self.addItem(item)
+
+
class PythonHighlighter(QSyntaxHighlighter):
Rules = []