Will not open file (Charset Exception when reading file)
See original GitHub issueJabRef version
Latest development branch build (please note build date below)
Operating system
Windows
Details on version and operating system
jabref 5.6 or 5.7 on WIndows 10
Checked with the latest development build
- I made a backup of my libraries before testing the latest development version.
- I have tested the latest development version and the problem persists
Steps to reproduce the behaviour
I moved a bib file to a new location and suddenly the file will not load. I will attach the log file - it’s some java error that I cannot decipher. I opened the bib file in emacs, and had emacs check the syntax, and it passed the test. I beautified the file in emacs and jabref still will not load the file.
If I remove two-thirds of the file, jabref will load the file. I thought there might be a malformed entry. By trial and error, I determined the exact stopping point. However, when I remove that entry, jabref still fails.
The problem arose with jabref 5.6. I installed jabref 5.7 and the same problem arose.
jabref opens another file without a problem.
Appendix
Paste an excerpt of your log file here
Error opening file 'C:\Users\singer.2\OneDrive - The Ohio State University\Documents\Projects\TauFibrils\Notes\Bibliography\PeptideFibrils1.bib'
java.nio.charset.MalformedInputException: Input length = 1
at java.base/java.nio.charset.CoderResult.throwException(Unknown Source)
at java.base/sun.nio.cs.StreamDecoder.implRead(Unknown Source)
at java.base/sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.base/java.io.InputStreamReader.read(Unknown Source)
at java.base/java.io.BufferedReader.fill(Unknown Source)
at java.base/java.io.BufferedReader.read(Unknown Source)
at java.base/java.io.FilterReader.read(Unknown Source)
at java.base/java.io.PushbackReader.read(Unknown Source)
at org.jabref@5.7.86/org.jabref.logic.importer.fileformat.BibtexParser.read(Unknown Source)
at org.jabref@5.7.86/org.jabref.logic.importer.fileformat.BibtexParser.skipWhitespace(Unknown Source)
at org.jabref@5.7.86/org.jabref.logic.importer.fileformat.BibtexParser.parseFileContent(Unknown Source)
at org.jabref@5.7.86/org.jabref.logic.importer.fileformat.BibtexParser.parse(Unknown Source)
at org.jabref@5.7.86/org.jabref.logic.importer.fileformat.BibtexImporter.importDatabase(Unknown Source)
at org.jabref@5.7.86/org.jabref.logic.importer.fileformat.BibtexImporter.importDatabase(Unknown Source)
at org.jabref@5.7.86/org.jabref.logic.importer.OpenDatabase.loadDatabase(Unknown Source)
at org.jabref@5.7.86/org.jabref.cli.ArgumentProcessor.importAndOpenFiles(Unknown Source)
at org.jabref@5.7.86/org.jabref.cli.ArgumentProcessor.processArguments(Unknown Source)
at org.jabref@5.7.86/org.jabref.cli.ArgumentProcessor.<init>(Unknown Source)
at org.jabref@5.7.86/org.jabref.gui.JabRefMain.start(Unknown Source)
at org.jabref.merged.module@5.7.86/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown Source)
at org.jabref.merged.module@5.7.86/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(Unknown Source)
at org.jabref.merged.module@5.7.86/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at org.jabref.merged.module@5.7.86/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
at org.jabref.merged.module@5.7.86/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at org.jabref.merged.module@5.7.86/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at org.jabref.merged.module@5.7.86/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Issue Analytics
- State:
- Created a year ago
- Comments:15 (9 by maintainers)
Top GitHub Comments
I will make the subject line attn ThiloteE
5.3 opens the old file successfully! 5.6 and 5.7 do not.
The old version last saw emacs several years ago, before I saw the light and switched to jabref. It had been saved by jabref many times.
The only time I saved the file from emacs using undecided-unix was the other day, (wrongly) thinking that would take care of character set issues. Now I know to save using utf-8.
Thanks for your help, Sherwin
From: ThiloteE @.> Sent: Tuesday, May 31, 2022 7:29 AM To: JabRef/jabref @.> Cc: Singer, Sherwin @.>; Author @.> Subject: Re: [JabRef/jabref] Will not open file (Charset Exception when reading file) (Issue #8870)
This problem goes both ways: Emacs could have changed their “undecided unix” export. What happens if you import or open the non-working file with older versions of JabRef? — Reply to this email directly, view it on GitHub, or
This problem goes both ways: Emacs could have changed their “undecided unix” export. What happens if you import or open the non-working file with older versions of JabRef?
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/JabRef/jabref/issues/8870*issuecomment-1142011129__;Iw!!KGKeukY!xHet1mEzjsRKLUyE2nxsUm-CmvrHI4qHiEpqV-KMbjF3ae7nt5QepuSFz1_hcO655kYiwGJXkoWYslyNR0dqFuNqEH1Gw9sHJfnI$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AJII6NCAO2PSROYB25ERWR3VMXZY7ANCNFSM5XLL5PBA__;!!KGKeukY!xHet1mEzjsRKLUyE2nxsUm-CmvrHI4qHiEpqV-KMbjF3ae7nt5QepuSFz1_hcO655kYiwGJXkoWYslyNR0dqFuNqEH1Gw0UWt8rK$. You are receiving this because you authored the thread.Message ID: @.@.>>