texstudio
texstudio copied to clipboard
Display the `inputenc` names of the encoding names in the UI's bottom encoding drop down list
Describe the feature and the current behavior/state
In the encoding drop down list at the UI's bottom, the names displayed:
- UTF-8
- windows-1252
- macintosh
- ISO-8859-1
are not clearly related to their inputenc
(LaTeX package) counterparts:
-
utf8
-
cp1252
-
applemac
-
latin1
I suggest for the latter ones to be displayed as well (for instance in parentheses after the former ones).
Who will benefit with this feature?
Everyone, but especially beginners/intermediate users.
Not that easy for a good first issue: I cannot find the file corresponding to this list of these (only) 4 encodings: UTF-8, windows-1252, macintosh, ISO-8859-1.
The file encoding.cpp
contains much more encodings (and, I guess, is corresponding to the "Select File Encoding" dialog box (Edit → Setup Encoding... or, in the encoding drop down list at the UI's bottom, More Encodings).

and quick document:
OK, thanks. Anyway, not easy to figure out how to add the inputenc
corresponding encodings. I don't want to break something.
don't worry to break something. Firstly you will test yourself. Secondly the change will be reviewed for integration and any kinks will be discussed then.
Sorry, I cannot see how to achieve the expected result (I don't know the C++
language).
Sorry, I cannot see how to achieve the expected result (I don't know the
C++
language).
I think that you only have to change this line from configmanager.cpp
:
registerOption("Common Encodings", &commonEncodings, QStringList() << "UTF-8" << "ISO-8859-1" << "windows-1252" << "Apple Roman");
(config dialog with encoding)
In this piece of code, we see that UTF-8
string is added in both ui.comboBoxEncoding, ui.comboBoxBibFileEncoding, ui.comboBoxLogFileEncoding
.
But I don't know if it is a good idea to change it to lowercase, since all other encodings added into those list are in uppercase.
Sorry, I cannot see how to achieve the expected result (I don't know the
C++
language).I think that you only have to change this line from
configmanager.cpp
:
registerOption("Common Encodings", &commonEncodings, QStringList() << "UTF-8" << "ISO-8859-1" << "windows-1252" << "Apple Roman");
I suspect that this line is not being used anymore.