6

I use JabRef on Windows 7 64 bit. The option for the .bib-file is set to UTF8. When I use the DOI to BibTeX feature in Jabref and import any DOI that leads to a source with special characters in its properties, say this one ...

10.1007/978-3-540-92788-4_1

Windows

... I get this result on Windows (version 2.9):

enter image description here

... it's the same with 2.10 beta3 on Windows:

enter image description here

... and the same for the final release for 2.10 for the doi 10.1051/jp2:1995145:

enter image description here

Here is a screenshot of the saved file opened in Notepad++:

enter image description here

Linux

It is working on Linux (Xubuntu 13.10 with version 2.10 beta):

enter image description here

Options

Here are my options, which are equal for both installations (imported the options file into the other installation):

enter image description here

However I'd like to stay with utf-8-encoded files and try not to rework the faulty entries. Is there some way to have the .bib-file in utf-8 and still use the DOI to BibTeX feature? It's a bit odd JabRef can load the .bib-file which is already encoded in utf-8 but when I add something, it produces the faulty parts.

The thing is, whether I open a .bib-file saved by JabRef on either Windows or Linux, Notepad++ says (in the lower right) it is encoded Ansi as UTF-8 so I'm quite confused what is actually causing this if there aren't any encoding issues.

henry
  • 6,594
  • Have you modified the preview window at all? – Joseph Wright Mar 08 '14 at 08:55
  • No, I think although I don't fully understand your question. Well I don't recall any modifications in regards to the preview windows. Installed JabRef about 3 days ago and played around with it, just changed some settings in regards to the owner, Biblatex and set that encoding option to UTF8. Hope that answers your question. – henry Mar 08 '14 at 08:58
  • It looks to me as if the file got saved in a non-UTF8 format to start with, so the chars are messed up. I'd fix in a text editor, make sure JabRef is correctly set to use UTF-8 then re-open the fixed file. – Joseph Wright Mar 08 '14 at 09:36
  • Hm... I wish. I did that and it didn't solve it. I opened my .bib file in Notepad++, converted it from UTF-8 without BOM to UTF-8 and the re-opened it with JabRef. Still the same problem. I then opened a new file in JabRef on both Windows and Linux just for that DOI and on Windows it lead to screenshot taken in Notepad++. So I think there is more to it. – henry Mar 08 '14 at 10:05
  • I am going to uninstall JabRef completely now (via CCleaner) and then check my %user folder for leftovers and then install it again. – henry Mar 08 '14 at 10:10
  • Damnit nothing changed. This makes JabRef on Windows pretty useless. :( – henry Mar 08 '14 at 10:18
  • As far as I know, one has trouble compiling .tex files that are encoded in UTF8 format with BOM, at least for (PDF)LaTEX. For .bib files and Biber I'm unsure, but I think it would be safer to save them without BOM. – Bernard Mar 08 '14 at 18:48
  • Huh? Hm... I don't think so. Tested some example file via file -i test.bib on Xubuntu and it gave me charset=utf-8 which clearly indicated an utf-8 encoding, so I don't think all the users on Linux have major problems unless "utf-8" on Xubuntu stands actually for utf-8 without BOM. – henry Mar 08 '14 at 20:55
  • 1
    I can confirm this behavior. Adding the two mentioned DOIs using the Web Search (F5) -> DOI to BibTeX will results in broken umlauts. The bib file encoding was set to UTF8, versions tested was 2.10. You should just file a bug report in the JabRef bug tracker. – matth Mar 13 '14 at 16:36
  • I'd agree with @matth here: an issue with the importer rather than the general JabRef program. (I use it routinely with UTF-8 entries but type them in myself.) – Joseph Wright Mar 13 '14 at 17:47
  • 2
    To whoever added the bug already, thank you. I was just in the process of signing up to Sourceforge but apparently someone got to it faster. :) – henry Mar 14 '14 at 07:16
  • There has always been an issue with the Win version of Jabref regarding importing, encoding and Java if special characters involved. For the quick fix, I have tried several different text editors (e.g TextPad) till I get the correct solution. Good luck. – berkus Jul 03 '17 at 08:07

1 Answers1

1

Since Jabref relies on the standard Java's Preferences API, it assumes the encoding of the stuff being imported is the same as the host OS's. So we critically need an additional option to specify that encoding on windows. A tentative solution is explicitly call Jabref's jar and set encoding from the command line as

java -Dfile.encoding="UTF-8" JabRef-2.10.jar

To make java work you may have to set the PATH variable.

Guo
  • 13