13

I'm inputting a file into LaTeX (in verbatim mode) that contains a unicode smiley character, code 128512.

I thought declaring

\DeclareUnicodeCharacter{128512}{\smiley}

would do the trick, but:

Package inputenc Error: 128512 too large for Unicode.
  • marvosym.sty tikzsymbols.sty and arev.sty also having good smilies – MadyYuvi Oct 16 at 9:08
19

\DeclareUnicodeCharacter takes the codepoint in hexadecimal notation:

\documentclass{article}
\usepackage{wasysym}
\DeclareUnicodeCharacter{1F600}{\smiley}
\begin{document}
Hello 😀
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.