# ! Package inputenc Error: Unicode char ▁ (U+2581) (inputenc) not set up for use with LaTeX

I get this error, although I'm not able to find the correspondent LaTeX character to declare.

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


In most font I saw, the full block is a square one em wide so positioned as it has the same height above the cap height as its depth. The character U+2581 is the lowest eighth part of it.

\documentclass{article}
\usepackage[utf8]{inputenc}

\newcommand{\block}[1]{%
\raisebox{\dimexpr(\fontcharht\fontX-1em)/2}{\rule{1em}{#1\dimexpr1em/8}}%
}
\DeclareUnicodeCharacter{2581}{\block{1}}
\DeclareUnicodeCharacter{2582}{\block{2}}
\DeclareUnicodeCharacter{2583}{\block{3}}
\DeclareUnicodeCharacter{2584}{\block{4}}
\DeclareUnicodeCharacter{2585}{\block{5}}
\DeclareUnicodeCharacter{2586}{\block{6}}
\DeclareUnicodeCharacter{2587}{\block{7}}
\DeclareUnicodeCharacter{2588}{\block{8}}

\begin{document}

A▁A▂A▃A▄A▅A▆A▇A█

\end{document}


• Also changing the LaTeX engine to xelatex` did it, thanks! Apr 29, 2018 at 18:12