I would like to add this symbol: � to a beamer presentation. It is shown when something went wrong with the encoding.

Sadly, I can't simply include this symol:

! Package inputenc Error: Unicode char \u8:� not set up for use with LaTeX.
See the inputenc package documentation for explanation.

and I don't have any idea how to get it in LaTeX

(An image is not the solution I would like to use!)

Detexify didn't help either.

Description of the symbol (to make it easier to find):

  • a black diamond with a white question mark within or
  • a black sexagon with a white question mark
  • seems to be "\xa0" in sed

How is this symbol � called? How can I print it with LaTeX?

4 Answers 4


Following David Carlisle's suggestion here's a TikZ solution:


% w/o following space!
\newcommand{\quem}{\tikz[baseline=(wi.base)]{\node[fill=black,rotate=45,inner sep=.1ex, text height=1.8ex, text width=1.8ex] {};%
\node[ font=\color{white}] (wi) {?};}}


 Some  \quem Text


You may alter the size of the black triangle by playing with inner sep and keep in mind that there is no space an the end of the macro.


The symbol you actually pasted into this question is U+FFFD Thus is the Unicode replacement character that applications use as a substitute when they are otherwise confused. It doesn't have a default presentation as it is essentially a kind of control character. The font here is showing it in that form.

If you don't specifically need it as a single text character you could of course produce it in latex by including an image or by over-printing a white question mark over a black diamond.

So in pdflatex this works:

enter image description here





% Methode 1                                             

This is U+FFFD (�)


Obviously you can put more design into the white on black ? if needed, this just shows the basic idea.

  • +1. I was so free as to use your suggestion (over-printing) for another answer. Now there are three solutions: \DeclareUnicodeCharacter, TikZ, over-printing. Nice!
    – Stephen
    Commented Nov 11, 2012 at 11:35
  • @Stephen the \DeclareUnicodeCharacter is an input side declaration independent of the way the character is rendered, you could use it with either of the other two solutions posted so that the input character (�) produce the tikz code \DeclareUnicodeCharacter{FFFD}{\quem} or the overprint \DeclareUnicodeCharacter{FFFD}{\encodingerror} Commented Nov 11, 2012 at 11:47

and a solution without loading a bombastic package:

\newsavebox\Diam@nd \newlength\x@D\newlength\y@D


Some  \Quem\ Text \huge \Quem\ Text 


enter image description here

It also takes the fontsize into account


Over-printing a white question mark over a black diamond, as suggested by David Carlisle, could be accomplished by






An \encodingerror occurred.


An <?> [encoding error] occurred.

The xspace could also be used for bloodworks' answer, of course.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .