()
return res
Return a list of all current selected encodings from user preferences.
Return a list of all current selected encodings from user preferences.
Return a list of all current selected encodings from user preferences .
def list_selected_encodings():
    # type: () -> List[str]
    """
    Return a list of all current selected encodings from user preferences.
    """
    settings = QSettings()
    settings.beginGroup(SettingsGroup)
    res = []
    for encoding, _ in ENCODING_DISPLAY_NAME:
        try:
            co = codecs.lookup(encoding)
        except LookupError:
            continue
        selected = settings.value(
            co.name, defaultValue=co.name in DEFAULT_ENCODINGS, type=bool
        )
        if selected:
            res.append(co.name)
    return res
def list_selected_encodings ( ) : # type: () -> List[str] settings = QSettings ( ) settings . beginGroup ( SettingsGroup ) res = [ ] for encoding , _ in ENCODING_DISPLAY_NAME : try : co = codecs . lookup ( encoding ) except LookupError : continue selected = settings . value ( co . name , defaultValue = co . name in DEFAULT_ENCODINGS , type = bool ) if selected : res . append ( co . name ) return res