-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consistent encoding strings #155
Comments
I fully agree with what you write and just had a look at this issue. As far as I can see, we can just replace the faulty names with the correct ones in To sum up: This change looks pretty easy to me, but perhaps I just overlooked a difficult problem. Can you point me to code that breaks with the above changes? |
Can the user select the encoding in the UI? Do we want to automatically upgrade from an old encoding name to the new encoding name? Where are the used encodings stored? |
Yes, at various positions, for instance when a save action fails with an
Can you describe some more what exactly you mean by automatic upgrade? Me changing source code would be a manual upgrade.
Encodings are stored in the Encodings class as linked by Olly above. |
Yes! I know that this will introduce backward compatibility issues. However, we should move forward ^^. |
👍 Automatic upgrade: replace the encoding in the first line of the .bib file with a newer encoding: utf8 --> utf-8 Are encodings stored in the preferences as well? Do we have to upgrade there, too? |
Are encodings stored in the preferences as well? Do we have to upgrade there, too? I have no idea, but would be very glad if you find out :) |
|
The only critical position where encodings were hardcoded were the preferences. Thanks @simonharrer! I added compatibility code to automatically update the preferences and this issue should be fixed. |
JabRef's current encoding list lists possible encodings.
The strings have flaws:
UTF8
andUTF-16
are possible encodings. I really dislike the inconsistency between them:UTF8
has no-
, butUTF-16
has: Both should have a dash resulting inUTF-8
. (see https://de.wikipedia.org/wiki/UTF-8)Cp1251
should beCP1251
(see http://man7.org/linux/man-pages/man7/cp1251.7.html for example). Similar for all other code pagesISO8859_15
should beISO8859-15
(see https://de.wikipedia.org/wiki/ISO_8859-15). Similar for all other encodingsOn the one hand, I am very well aware that a change here results in a large compatibility code where the old strings have to be mapped to the new strings. On the other hand, I would like to see JabRef having strings not causing confusion.
Related: #118, #131
The text was updated successfully, but these errors were encountered: