https://bugs.kde.org/show_bug.cgi?id=523283

--- Comment #2 from [email protected] ---
In the first comment, in my STEPS TO REPRODUCE, I accidentally switched from
test.bib to temp.bib during the step. It should have said test.bib in all the
steps.

I have now attached a second video showing what happens when a .bib file has
any LaTeX-encoded characters, e.g., {\"e}, even if the .bib file contains just
a single entry with no bad characters. These LaTeX-encoded characters get
converted into ë against the user's wishes.

STEPS TO REPRODUCE

1. In a pure-text editor like Gedit, create a new file test2.bib containing
only a single entry containing the LaTeX-encoded character {\"e}:

@article{New1,
        author = {Last, First},
        title = {{T{\"e}st Title}}
}

2. Open the file test2.bib in KBibTeX.

3. Notice that the encoding is LaTeX. Make a trivial change to the file so that
it can be saved. Then close KBibTex.

4. Then open the test2.bib file again in Gedit. The file now has the new first
line @comment{x-kbibtex-encoding=utf-8}.

5. Open the test2.bib file again in KBibTeX. It now shows UTF-8 as the
encoding.

6. Save the file again in KBibTeX, without manually switching it back to LaTeX.
Close KBibTex. 

7. Open the test2.bib file again in Gedit. You will see that the {\"e}
character has been replaced by ë.

OBSERVED RESULT

Saved files all default to UTF-8 encoding for no reason, converting
LaTeX-encoded characters into UTF-8 (e.g., {\"e} gets converted to ë).

EXPECTED RESULT

KBibTeX should maintain files in LaTeX encoding if they do not contain any bad
characters.

Right now the only way to avoid this problem is to manually switch from UTF-8
to LaTeX every time the .bib file is opened in KBibTeX before saving it again.
If the user neglects to do this even just one time, then the .bib file will be
saved with all LaTeX-encoded characters switched to UTF-8 characters, leading
to later problems with LaTeX processing.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to