0

This question already has an answer here:

When I compile a .tex file on a new computer, I got error message

! Package inputenc Error: Unicode character � (U+FFFD) (inputenc) not set up for use with LaTeX.

I tried to remove \bibliography{references} and the error goes away. Clearly, it is something in my bib file, but I couldn't figure it out.

marked as duplicate by moewe bibliographies Mar 26 at 7:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    U+FFFD seem to be a character for special usage. It should not be part of your bibliography but your description suggests it is. Try to spot that character and delete it. – Symbol 1 Mar 21 at 4:12
  • 3
    Some software replaces invalid characters with U+FFFD. – Davislor Mar 21 at 6:16
  • 2
    If your bibliography is otherwise English/ASCII you may just try to search for non-ASCII chars in the .bib file. Not sure if this works for U+FFFD, but you could add \DeclareUnicodeCharacter{FFFD}{XXXX Here I am?????XXXX} to your preamble and search for XXX in your resulting document to find out where the character lives. If that does not help, I'm afraid you will have to resort to binary search: Delete the second half of your .bib file and see if the error persists. If not, add the first half back in, delete the second half and see if the error persists. ... – moewe Mar 21 at 7:29
  • 1
    .... Repeat that until you have found the culprit. Note that since the error is in the .bib file and thus manifests itself to LaTeX in the .bbl file you should delete the .bbl file after each step and compile anew with LaTeX, BibTeX, LaTeX. That makes the procedure a bit more tedious. – moewe Mar 21 at 7:30
  • Wow! @moewe your suggested approach works! I – David Xiaoyu Xu Mar 21 at 15:22