Skip to content
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

Rework used encodings #2013

Closed
tobiasdiez opened this issue Sep 19, 2016 · 4 comments
Closed

Rework used encodings #2013

tobiasdiez opened this issue Sep 19, 2016 · 4 comments
Labels
cli fetcher type: code-quality Issues related to code or architecture decisions

Comments

@tobiasdiez
Copy link
Member

tobiasdiez commented Sep 19, 2016

I think JabRef sometimes uses encodings which are a bit counter-intuitive or where a better alternative might be available. Triggered by JabRef/JabRef-Browser-Extension#33.

In this issue, I try to collect the current usage of encodings so that we get an overview. Feel free to edit this list.

Operation Currently used Suggestion
Import from cmd (--importToOpen) File -> Default Argument -> File -> DB -> UTF8
Fetcher ? Fetcher decides -> File -> UTF8
Export ? ?
? ? ?

Legend:

  • File: as JabRef comment %Encoding: ....
  • Default: JabRefPreferences.getDefaultEncoding()
  • Argument: via the command line or by asking the user
  • DB: the encoding of the DB where the entries are imported to / exported from
@lenhard
Copy link
Member

lenhard commented Sep 20, 2016

One thing that we talked about earlier with regard to the BibtexParser: The encoding supplied in the bib file (%Encoding) is currently completely ignored by JabRef. The parser explicitly ignores it upon reading a file and it is stored nowhere. On writing the file, the encoding set in the preferences is used.

I want to note that this is nothing we "broke", JabRef has always done that as far as I can recall.

@tobiasdiez
Copy link
Member Author

Its ignored by the parser but not by the importer:

public ParserResult importDatabase(Path filePath, Charset defaultEncoding) throws IOException {

@lenhard
Copy link
Member

lenhard commented Sep 20, 2016

I see. My knowledge seems to be confined to the deeper parts of our parsing stack ;-)

@tobiasdiez
Copy link
Member Author

I don't think that we currently have open issues related to the encoding. Although the used encoding is still sometimes a bit mystic, I will close this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli fetcher type: code-quality Issues related to code or architecture decisions
Projects
None yet
Development

No branches or pull requests

2 participants