GeneralPackage inputenc Error: Unicode char not set up for use with

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Davis et al
Posts: 3
Joined: Sun Aug 14, 2016 10:32 am

Package inputenc Error: Unicode char not set up for use with

Post by Davis et al »

Hello,

If I write

Code: Select all

I examine the five-year effective rates. 
I get two error messages:
(i) ! Package inputenc Error: Unicode char fi (U+FB01)
(inputenc) not set up for use with LaTeX.
(ii) ! Package inputenc Error: Unicode char ff (U+FB00)
(inputenc) not set up for use with LaTeX.

In my preamble I write:

Code: Select all

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{natbib}
\bibliographystyle{apalike}
\usepackage[onehalfspacing]{setspace}
\usepackage[nottoc]{tocbibind}
\usepackage[left= 4cm,right = 2cm, bottom = 2 cm]{geometry}
\usepackage{hyperref}
\usepackage[nopostdot,toc,nonumberlist]{glossaries}
\makeglossaries
I need help, please.

Best & many thanks in advance!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Package inputenc Error: Unicode char not set up for use with

Post by Johannes_B »

You should write it with ligatures directly. Just use fi and ff instead. LaTeX will substitue with the real ligatures if they are provided in the font you use.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Davis et al
Posts: 3
Joined: Sun Aug 14, 2016 10:32 am

Re: fi and ff // inputenc Error

Post by Davis et al »

Hi Johannes,

thank you for your reply. However, I do not know how to write it with ligatures directly ...

Best
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Package inputenc Error: Unicode char not set up for use with

Post by Johannes_B »

Oh sorry, i mised a little not there. Right now, you are inputting ligatures directly, but you should not. Just press the f button, and then the i button to get fi instead of the ligature.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10316
Joined: Mon Mar 10, 2008 9:44 pm

Package inputenc Error: Unicode char not set up for use with

Post by Stefan Kottwitz »

Hi Davis,

welcome to the forum!

As Johannes said; write two f instead of ff. LaTeX takes care of the ligatures itself. I guess you don't type the text but copy & paste text from the Internet or from a PDF file.

For direct input, Clemens wrote a solution here: Input Encoding Issue.

So, you could add these 3 lines in the preamble here, if needed:

Code: Select all

\documentclass{article}
\usepackage{newunicodechar}
\newunicodechar{fi}{fi}
\newunicodechar{ff}{ff}
\begin{document}
I examine the five-year effective rates.
\end{document}
Stefan
LaTeX.org admin
Davis et al
Posts: 3
Joined: Sun Aug 14, 2016 10:32 am

Re: fi and ff // inputenc Error

Post by Davis et al »

Hello Stefan,

thank you! In fact, I copied it from an PDF to cite a sentence.
Now it works!

Best
pc_bolla
Posts: 1
Joined: Tue Sep 25, 2018 9:57 am

Package inputenc Error: Unicode char not set up for use with

Post by pc_bolla »

Faced the same issue (like Davis et al) and the solution by Stefan Kottwitz worked. Thanks man!
vivekdabra09
Posts: 1
Joined: Wed May 12, 2021 2:22 pm

Package inputenc Error: Unicode char not set up for use with

Post by vivekdabra09 »

Thank you Stefan Kottwitz. Your solution worked!!! :D
Post Reply