TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For various reasons, I'm stuck with (dvi)latex and inputencoding latin1. I still want to enter unicode codepoints (I have the hex/decimal numbers ready).

I have seen http://tex.stackexchange.com/a/32514/24158 but this does not seem to work for me:


I just get some ! Bad character code (324)..

share|improve this question
up vote 3 down vote accepted

\symbol{324} can only take values in the 8-bit range and refers directly to the underlying font not going through latex's encoding mechanisms.

Any symbol for which there is support in \usepackage[utf8]{inputenc} will have a mapping from the Unicode number to a TeX definition in the utf8 files in the base distribution, or you can directly code something. so Unicode 324 is LATIN SMALL LETTER N WITH ACUTE so you can use \'{n} which corresponds to this line in utf8enc.dfu in the base latex distribution


decimal 324 being hex 144

If you don't want to look up the definitions in the file, you can load the file with a local definition that removes the utf8 decoding part:

  \expandafter\def\csname ut-#1\endcsname{#2}}
\def\UseUnicodeCharacter#1{\csname ut-#1\endcsname}





enter image description here

share|improve this answer
The interesting question is: Can I use the tables in the base distribution? Like how can I use that \DeclareUnicodeCharacter{0144}{\@tabacckludge'n} and have something like a \InsertUnicode{0144} which goes through those tables and finally does the \@tabacckludge'n? Using \'{n} is an option for individual characters, but I would prefer to be able to enter unicode codepoints, because those are in my sources. – Elrond Apr 15 '13 at 15:44
@Elrond see updated code – David Carlisle Apr 15 '13 at 15:56

Input the relevant file, for instance t1enc.dfu for the characters obtainable in the T1 encoding. Just assign a suitable definition to \DeclareUnicodeCharacter.

    \expandafter\gdef\csname uni\number"##1\endcsname
\newcommand\unisymbol[1]{\csname uni\number#1\endcsname}


\unisymbol{324} \unisymbol{"0144} \unisymbol{"0428}

This will print

ń ń Ш

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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