Yuya Nishihara  committed a54da32

settings: add known encodings to combo box

  • Participants
  • Parent commits d89f441
  • Branches stable

Comments (0)

Files changed (2)

File tortoisehg/hgqt/

             ui.debug('ignoring invalid web.encoding: %s\n' % enc)
     return canonname(encoding.encoding)
+def knownencodings():
+    """List of encoding names which are likely used"""
+    return [enc for enc, _region in _ENCODINGNAMES]
 def createActionGroup(parent):
     group = QActionGroup(parent)

File tortoisehg/hgqt/

 from tortoisehg.util import hglib, paths, wconfig, i18n, editor
 from tortoisehg.util import terminal, gpg
 from tortoisehg.hgqt.i18n import _
-from tortoisehg.hgqt import qtlib, qscilib, thgrepo, customtools
+from tortoisehg.hgqt import qtlib, qscilib, thgrepo, customtools, fileencoding
 from PyQt4.QtCore import *
 from PyQt4.QtGui import *
         _('Repository name to use in the web interface, and by TortoiseHg '
           'as a shorthand name.  Default is the working directory.'),
-    _fi(_('Encoding'), 'web.encoding', (genEditCombo, ['UTF-8']),
+    _fi(_('Encoding'), 'web.encoding',
+        (genEditCombo, fileencoding.knownencodings()),
         _('Character encoding of files in the repository, used by the web '
           'interface and TortoiseHg.')),
     _fi(_("'Publishing' repository"), 'phases.publish', genBoolRBGroup,