I am using JabRef to insert library on .tex files. Encoding in JabRef is UTF-8 and so is in .tex files.
Some of the references contain special characters. I get the followign symbols in .bib file:
ĂŻ
�
á etc
I try to manually correct these issues, so that:
ĂŻ → {"\i}
â€� → -
á → {'i} etc
Once I do this and run .tex file, everything is OK. But if I add any new reference from the JabRef interface and save it, characters become again unusual and I get the following error when running the .tex file: “! Package inputenc Error: Invalid UTF-8 byte sequence.”
What can I do so that JabRef is properly saving the .bib files? Additionally, is there any way for the references that I have already modified, not to change back after adding or modifying a reference?
This sounds like a problem with the Latex2Unicode conversion. There has been reported a similar bug.
Generally, you can check your library preferences, if you have any save actions defined. So in that case JabRef should not convert your changes.
Do you have a sample reference? For a simliar buf report see here
Thank you! Finally, the problem was solved! Original encoding for my tex files was windows-1250. I changed it to UTF-8 but still had the problem because I hadn’t restarted the application. Once, I closed and opened it again, it worked properly.
Journal of Nature & Climate Change,
.
When I import this into Jabref and cite into Texstudio LaTeX document from .bib file, latex gives me error of wrong alignment character and shows something {\em Journal of Nature & Climate Change}, I correct all these manually and it workss fines then but when i import another from Jabref, the Jabref update the .bib file and overwrite all my & to & again and error start again.
Sample Journal is Journal of Nature & Climate Change while Jabref imports Journal of Nature & Climate Change
@FARMAN_ULLAH_KHAN I think you should create a separate GitHub issue. We need precise before and after data. Best to copy the whole bibtex entry (can be found in {} biblatex source tab). Also, when reporting the issue, please use syntax as described at Basic Syntax | Markdown Guide to enclose those special characters, that way they will not be rendered differently by html or markdown. This will avoid confusion.
To narrow down where the ampersand changes, could you try this on a copy of the library with just one affected entry? Keep a copy of the original, then compare the entry after opening it in JabRef, after saving, and after importing another reference. Note the JabRef version, operating system, and any enabled save actions; if possible, repeat with those actions disabled on a separate copy. That comparison could show which step changes the field without assuming the cause.
In the .bib source, the ampersand in a LaTeX title normally needs escaping as \& (backslash ampersand), so the field should contain something like Journal of Nature \& Climate Change. If you correct that manually and a later JabRef save removes the backslash, compare the entry in the biblatex source tab before and after saving, and check whether a cleanup/save action is rewriting the field. Testing one affected entry on a copy with save actions disabled should show whether the overwrite happens during import or saving.