# How to use \DeclareUnicodeCharacter with U+302 for biblatex [closed]

I am using a .bib file exported from Zotero with BetterBibTeX. I have activated the option export unicode as plain-text latex commands in the Better BibTex export options for BibLaTeX. I am stuck with pdftex and cannot swtich to XeLaTeX.

I was having errors regarding some unicode characters, such as ⟨:

! Package inputenc Error: Unicode char ̂ (U+302)
(inputenc)                not set up for use with LaTeX.


I'm using \usepackage[utf8]{inputenc}, and I could fix the trouble with the angled brackets by loading the newunicodechar package and adding the following definitions to my preamble following this question:

\newunicodechar{⟨}{$\langle{}$}
\newunicodechar{⟩}{$\rangle{}$}


But how to do this for U+302 as it is a compounding character? The citation is a French name with î in the name. The .bib file contains

author = {Lalanne, Jean-Beno{\^\i}t}


I tried with

\newunicodechar{î}{\^{i}}


but it does not recognize the command. Next up:

\DeclareUnicodeCharacter{302}{\^{}}


which makes the error disappear but the output is Jean-Benoıˆt. I'm out of ideas.

• If you use utf8 as inputenc and all your files are encoded accordingly, just input î in your bib file directly. This should do the trick. But I guess you want to use the bib entries that have been generated externally, right? – Jasper Habicht Jan 15 '18 at 7:04
• It's my own .bib file (utf8-encoded). I tried it, and the î shows correctly, but I still get complaint about Unicode char ⟨ (U+27E8). So in a way it solved my problem with the circumflex. – user334287 Jan 15 '18 at 7:22
• Use Beno{\^i}t or, directly, Benoît. Since Biber is able to read Unicode, you may try not setting the “Unicode as plain-text LaTeX commands”. – egreg Jan 15 '18 at 7:22
• Combining characters with \i/i are a bit tricky, see: tex.stackexchange.com/q/251261/35864. Not all unicode characters are recognised by inputenc out of the box, that is why you need code for the angled brackets. – moewe Jan 15 '18 at 7:39
• Run biber --output-safechars ... – user2478 Jan 15 '18 at 7:50