Closed koppor closed 9 years ago
As new user in the BibTeX world one might think that this line is important that JabRef can deal with it. Since all most pages about latex and bibtex recommend JabRef, I vote for completely dropping the line - even though some completely new users are not directly guided to JabRef.
Specifically for new users thinking such a line is important, I suggest to add
% Go to <http://> and give money to JabRef
;-)
I'll vote for dropping the line completely as well.
Add the first line as
-- coding: utf-8 --
which actually makes sense in many text editors.
mån 24 aug 2015 11:59 Jörg Lenhard notifications@github.com skrev:
I'll vote for dropping the line completely as well.
— Reply to this email directly or view it on GitHub https://github.com/JabRef/jabref/issues/118#issuecomment-134123566.
Ok, @bluebirch has a point. We could just switch to a standard notation for specifying the encoding.
I don't really know what the most widely used notation for specifying the encoding is, so if no one objects, -*- coding: utf-8 -*-
would be fine by me.
% !TEX encoding = UTF-8 Unicode
%%% coding: utf-8
%% Saved with string encoding Unicode (UTF-8)
I don't know about Zotero and other bibtex managers.
@bluebirch Could you name some of the "many text editors"? Would be nice to have a justified decision as we don't want to change that line the next years. :grinning:
You might be right. As a former Emacs user, I see the world differently. But I'm slowly adapting to a new reality with Sublime Text. ;-)
I really like some auto-detection, which frees the user to configure its programs.
We can also go for supporting UTF-8 only to have the .bib
file really portable across different systems. Other encodings can be converted to UTF-8 by JabRef while loading.
Just stumbled over this - However, I don't have the time to dig deeper in the matter, but the first line seems to have some purpose ;-)
Yes there is still one migration based on the JabRef version.
We can remove the file header though.
We just need to keep the logic for parsing the old header possibly...
See FileLinksUpgradeWarning.java
This commit 4558fb644330b5dc0120332979fd7871420be049 removes the JabRef version file header. We need to come up with a good solution for the encoding though. Backwards compatibility is tested and retained in this commit. We could remove quite some code if this can be made obsolete.
The encoding name is now written as "UTF-8", see also #155 The old "UTF8" is automatically overwritten when the file is saved.
How about settling with the current status quo for now:
% Encoding: UTF-8
and closing this issue? Any objections?
Fine with me. The other encoding strings are not convincing.
:+1:
Currently, JabRef adds following header to each BibTeX file
If users use different versions of JabRef, this causes problems. Therefore, I propose to just remove the first header line.
I'm not sure about the second line. Should we guess the encoding from the file or keep the encoding information?
Other JabRef settings such as the group information or the save order is stored in BibTeX
@comment
entries. Maybe we should require the encoding also be stored as@comment
? Possibly, this interferes with the parser and we have to first check existence of a encoding comment entry and then fire up the parser.