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

Author name with special characters breaks JabRef #5899

Closed
1 task done
carlinmack opened this issue Jan 30, 2020 · 9 comments · Fixed by #5926
Closed
1 task done

Author name with special characters breaks JabRef #5899

carlinmack opened this issue Jan 30, 2020 · 9 comments · Fixed by #5926
Labels
bug Confirmed bugs or reports that are very likely to be bugs fetcher

Comments

@carlinmack
Copy link

carlinmack commented Jan 30, 2020

JabRef version on JabRef 5.0-beta.334--2020-01-08--cafdb01 - Windows 10 10.0 amd64 - Java 13.0.1

Steps to reproduce the behavior:

  1. Add the following doi 10.1016/j.cosrev.2017.10.002
  2. Use the search button to download the file
  3. It downloads M�ntyl�2018 - The Evolution of Sentiment Analysis}A Review of Research Topics, Venues, and Top Cited Papers.pdf - note the special characters.
  4. When you try to save jabref logs an error
Log File
org.jabref.logic.exporter.SaveException: Problems saving:
  at org.jabref/org.jabref.gui.exporter.SaveDatabaseAction.saveDatabase(Unknown Source)
  at org.jabref/org.jabref.gui.exporter.SaveDatabaseAction.doSave(Unknown Source)
  at org.jabref/org.jabref.gui.exporter.SaveDatabaseAction.save(Unknown Source)
  at org.jabref/org.jabref.gui.exporter.SaveDatabaseAction.save(Unknown Source)
  at org.jabref/org.jabref.gui.BasePanel.runCommand(Unknown Source)
  at org.jabref/org.jabref.gui.actions.OldDatabaseCommandWrapper.execute(Unknown Source)
  at org.jabref/org.jabref.gui.actions.JabRefAction.lambda$new$2(Unknown Source)
  at org.jabref.merged.module/org.controlsfx.control.action.Action.handle(Unknown Source)
  at org.jabref.merged.module/org.controlsfx.control.action.Action.handle(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
  at org.jabref.merged.module/javafx.event.Event.fireEvent(Unknown Source)
  at org.jabref.merged.module/javafx.scene.Node.fireEvent(Unknown Source)
  at org.jabref.merged.module/javafx.scene.control.Button.fire(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.scene.control.inputmap.InputMap.handle(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
  at org.jabref.merged.module/javafx.event.Event.fireEvent(Unknown Source)
  at org.jabref.merged.module/javafx.scene.Scene$MouseHandler.process(Unknown Source)
  at org.jabref.merged.module/javafx.scene.Scene.processMouseEvent(Unknown Source)
  at org.jabref.merged.module/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
  at java.base/java.security.AccessController.doPrivileged(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
  at org.jabref.merged.module/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
  at org.jabref.merged.module/com.sun.glass.ui.View.notifyMouse(Unknown Source)
  at org.jabref.merged.module/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
  at org.jabref.merged.module/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
  at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Error in field 'FILE': Unescaped '}' character without opening bracket ends string prematurely. Field value: :Mntyl 2018 - The Evolution of Sentiment Analysis}A Review of Research Topics, Venues, and Top Cited Papers.PDF:PDF;:M�ntyl�2018 - The Evolution of Sentiment Analysis}A Review of Research Topics, Venues, and Top Cited Papers.PDF:PDF
  at org.jabref/org.jabref.logic.bibtex.BibEntryWriter.writeField(Unknown Source)
  at org.jabref/org.jabref.logic.bibtex.BibEntryWriter.writeRequiredFieldsFirstRemainingFieldsSecond(Unknown Source)
  at org.jabref/org.jabref.logic.bibtex.BibEntryWriter.write(Unknown Source)
  at org.jabref/org.jabref.logic.exporter.BibtexDatabaseWriter.writeEntry(Unknown Source)
  at org.jabref/org.jabref.logic.exporter.BibDatabaseWriter.savePartOfDatabase(Unknown Source)
  at org.jabref/org.jabref.logic.exporter.BibDatabaseWriter.saveDatabase(Unknown Source)
  ... 62 more
Caused by: org.jabref.logic.bibtex.InvalidFieldValueException: Unescaped '}' character without opening bracket ends string prematurely. Field value: :Mntyl 2018 - The Evolution of Sentiment Analysis}A Review of Research Topics, Venues, and Top Cited Papers.PDF:PDF;:M�ntyl�2018 - The Evolution of Sentiment Analysis}A Review of Research Topics, Venues, and Top Cited Papers.PDF:PDF
  at org.jabref/org.jabref.logic.bibtex.LatexFieldFormatter.checkBraces(Unknown Source)
  at org.jabref/org.jabref.logic.bibtex.LatexFieldFormatter.formatAndResolveStrings(Unknown Source)
  at org.jabref/org.jabref.logic.bibtex.LatexFieldFormatter.format(Unknown Source)
  ... 68 more

  1. This would be okay as you could delete the lines from Jabref, but it leaves the bottom of the file looking like this
...

@Article{M�ntyl�2018,
  author    = {Mika V. M�ntyl� and Daniel Graziotin and Miikka Kuutila},
  journal   = {Computer Science Review},
  title     = {The evolution of sentiment analysis{\textemdash}A review of research topics, venues, and top cited papers},
  year      = {2018},
  month     = {feb},
  pages     = {16--32},
  volume    = {27},
  doi       = {10.1016/j.cosrev.2017.10.002},
  file      = 
  1. removing the categories and breaking the jabref file
  2. On opening the jabref file you get the following error
    image
@Siedlerchr Siedlerchr added the bug Confirmed bugs or reports that are very likely to be bugs label Jan 31, 2020
@AEgit
Copy link

AEgit commented Jan 31, 2020

JabRef 5.0-beta.388--2020-01-29--eb988b6
Windows 10 10.0 amd64
Java 13.0.2

Can confirm this issue.

  1. Use Ctrl + N to generate a new entry
  2. Select ID type "DOI" and copy "10.1016/j.cosrev.2017.10.002" into the ID field
  3. Click "Generate"
  4. The generated item will contain question marks instead of umlaut "ä" in the bibtex key and the author's name

Note, that this issue does not appear, if you use the "Web search" feature, with Google Scholar selected. If you enter the doi "10.1016/j.cosrev.2017.10.002" there, click "Search" and then "Import entries", the entry will be imported without question marks and with the umlaut properly formatted following bibtex standard.

@Siedlerchr
Copy link
Member

I checked the http request to doi.org output, that is correct.
so somewhere in JabRef the wrong encoding is taken

@article{M_ntyl__2018,
	doi = {10.1016/j.cosrev.2017.10.002},
	url = {https://doi.org/10.1016%2Fj.cosrev.2017.10.002},
	year = 2018,
	month = {feb},
	publisher = {Elsevier {BV}},
	volume = {27},
	pages = {16--32},
	author = {Mika V. Mäntylä and Daniel Graziotin and Miikka Kuutila},
	title = {The evolution of sentiment analysis{\textemdash}A review of research topics, venues, and top cited papers},
	journal = {Computer Science Review}
}

@Siedlerchr Siedlerchr added this to the v5.0 milestone Jan 31, 2020
@tobiasdiez tobiasdiez removed this from the v5.0 milestone Feb 1, 2020
@Siedlerchr Siedlerchr added the good first issue An issue intended for project-newcomers. Varies in difficulty. label Feb 1, 2020
@bernhard-kleine
Copy link

Using JabFox in win10/firefox the file could be imported without problems. In the process of doi-import there is obviously a problem with coding At least the problematic name could be copy-pasted without any problem. On my win10 machine everything is utf8.

@Siedlerchr
Copy link
Member

I can no longer reproduce the problem, I updated the java version to 13.0.2 and from the changelog it seems they fixed some issues regarding network/http requests. So it could have been related to that.
I also checked the DOI from #5900. Works fine.

Could you please try with the latest master and report back if it works?
Java Version in the about dialog should be 13.0.2
Could you please try the latest snapshot?
http://builds.jabref.org/master/

@Siedlerchr Siedlerchr added status: waiting-for-feedback The submitter or other users need to provide more information about the issue and removed bug Confirmed bugs or reports that are very likely to be bugs good first issue An issue intended for project-newcomers. Varies in difficulty. labels Feb 9, 2020
@AEgit
Copy link

AEgit commented Feb 9, 2020

JabRef 5.0-beta.409--2020-02-09--6a9c915
Windows 10 10.0 amd64
Java 13.0.2

Cannot confirm, the issue persists. Have you tried the following DOI (as suggested by the thread starter):

10.1016/j.cosrev.2017.10.002

?

@Siedlerchr
Copy link
Member

I could partially reproduce it now with the installer version. Running from code seems to work. There must be something wrong with the encoding in the preferences. Weird.

@Siedlerchr Siedlerchr added bug Confirmed bugs or reports that are very likely to be bugs and removed status: waiting-for-feedback The submitter or other users need to provide more information about the issue labels Feb 9, 2020
@buhtz
Copy link

buhtz commented Feb 9, 2020

For the DOI 10.1016/j.cosrev.2017.10.002 causes this invalid filename (see the }):
Maentylae2018 - The Evolution of Sentiment Analysis}A Review of Research Topics, Venues, and Top Cited Papers.PDF

@AEgit
Copy link

AEgit commented Feb 12, 2020

JabRef 5.0-beta.418--2020-02-12--567dc68
Windows 10 10.0 amd64
Java 13.0.2

I can confirm this issue has been fixed in the current dev version of JabRef. Cheers, well done!

@buhtz
Copy link

buhtz commented Feb 12, 2020

I am not able to confirm because there is no file found for the DOI anymore. ;)
Maybe the fix affected the online PDF search?

But the umlauts are handled correct.

@koppor koppor moved this to Done in Prioritization Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs fetcher
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants