68 votes

! Package inputenc Error: Unicode char ́ (U+301)(inputenc)

I do this: \DeclareUnicodeCharacter{0301}{*************************************} and look into the pdf which char produces this and delete/correct it.
user avatar
  • 781
50 votes
Accepted

Is there any reason to use inputenc?

Update as of April 2018: The community has changed its default encoding to UTF-8 as of April 2018 (see https://tug.org/TUGboat/tb39-1/tb121ltnews28.pdf). So, the remark regarding LuaTeX or XeTeX ...
user avatar
  • 10.5k
42 votes
Accepted

Command \k unavailable in encoding OT1 (error takes me to line which doesn't even have "\k" in it

The error happens when LaTeX is reading line 538 in the bibliography file, probably generated by BibTeX. The entry refers to an author named Patrycja Dynarowicz-Łątka (a chemist at the ...
user avatar
  • 993k
41 votes

utf8x vs. utf8 (inputenc)

Don't use utf8x; with an up-to-date TeX distribution it could show necessary only for its most obscure features (faking characters with images from the Web, for instance). The problem with Greek, ...
user avatar
  • 993k
38 votes

Is there any reason to use inputenc?

With the 2018 release of LaTeX the test file below produces as UTF-8 is assumed as the default input encoding unless you specify a different encoding to inputenc and the BOM at the start of the file ...
user avatar
29 votes
Accepted

How is a mathematical formula represented in PDF?

Essentially in pdf every letter (or run of letters) is positioned by coordinates so even a normal word might be encoded as individual letters positioned to "look" like text, so as to take account of ...
user avatar
28 votes

How to write a letter "ģ"

Unfortunately, Latvian is quite poorly supported by babel: the letters with the comma diacritic are wrongly realized with a cedilla. Here's a possibly better realization. \documentclass{article} \...
user avatar
  • 993k
27 votes
Accepted

Unicode in PDF Metadata

Package hyperref hyperref encodes correctly, but the options should be set after hyperref is loaded. Otherwise LaTeX expands the options the hard way and hyperref will only see the expanded garbage. ...
user avatar
25 votes

"ö ü ä ß" in Latex (Mac, German, TeXShop)

Based on this LaTeX website, there are following solutions for your problem. According the subsection "indirekte Eingabe von Umlauten" you can write \"A, \"O, \"U, \"a, \"o, \"u and \ss{} or {\"A}, {\...
user avatar
22 votes

Why does inputenc abandon so quickly under "utf8 based engines"?

inputenc is abandoned because it does absolutely nothing with XeTeX or LuaLaTeX. Better said, it would do bad! See fontenc vs inputenc Essentially, the task performed by inputenc is translating ...
user avatar
  • 993k
21 votes
Accepted

In tex file ascii characters only : if so should I encode the file in ascii? Or is utf-8 better used anyway?

UTF8 and ASCII are byte for byte identical for characters in the ascii range so if you have a plain text file that is ascii encoded it is also UTF-8 encoded, and similarly if it is UTF-8 encoded but ...
user avatar
21 votes

Typesetting smileys in the input

\DeclareUnicodeCharacter takes the codepoint in hexadecimal notation: \documentclass{article} \usepackage{wasysym} \DeclareUnicodeCharacter{1F600}{\smiley} \begin{document} Hello 😀 \end{document}
user avatar
21 votes
Accepted

How do I make LaTeX understand Unicode characters ↔︎ and ↕︎

Actually, LaTeX has a pretty good Unicode support (better yet since the October 2019 update). You just need to define the character you want to type: \documentclass{article} \DeclareUnicodeCharacter{...
user avatar
20 votes
Accepted

biber - warning about non-ascii characters

To get rid off the warning you can change the input code to utf8 for your .tex-file. With the following changed MWE I have no warnings or errors from biber and only one warning with the .tex-file (...
user avatar
  • 63.4k
20 votes

Problem with LaTeX (missing $ inserted)

The error can only be reproduced if the file is saved in UTF-8 encoding. Indeed, in this case, ó is really stored as the bytes 0xC3 and 0xB3. In the latin1 encoding, the first is à and the second is ³...
20 votes

How do I make LaTeX understand Unicode characters ↔︎ and ↕︎

I would recommend the newunicodechar package for this: \usepackage{newunicodechar} \newunicodechar{↔}{\ensuremath{\leftrightarrow}} \newunicodechar{↕︎}{\ensuremath{\updownarrow}} You could also ...
user avatar
  • 38.2k
17 votes
Accepted

Do you teach LaTeX? How do you fight with encoding problems?

I usually start out using pdflatex and make sure the students have \usepackage[utf8]{inputenc} in their preamble to begin with, which so far has proven to work on all systems. After a bit of ...
user avatar
17 votes
Accepted

How to get Unicode characters U+2713 and U+2717 to display in pdfLaTeX?

Package pifont contains the characters (\ding{51} and \ding{55}) and package newunicodechar helps in assigning them to the Unicode slots: \documentclass{article} \usepackage[utf8]{inputenc} \...
user avatar
17 votes

Can we stop recommending fontspec as first choice in case lualatex is used?

fontspec doesn't change the math setup to unicode math fonts -- this is done by unicode-math -- it only change some math alphabet like \mathrm and with the option no-math you could avoid this too. So ...
user avatar
17 votes
Accepted

Why do German umlauts and sharp s (ß) work without a package in LaTeX?

Since the April 2018 release, LaTeX considers UTF-8 as default input encoding Thus calling \usepackage[utf8]{inputenc} at the start is no longer required. If a file has a different encoding than UTF-...
user avatar
  • 993k
16 votes
Accepted

! Package inputenc Error: Unicode char ́ (U+301)(inputenc)

If you copy/paste some source, it may happen that é had been coded as U+0065 U+0301 which in Unicode aware environments is rendered as expected. Unfortunately pdflatex is not Unicode aware and ...
user avatar
  • 993k
16 votes

What is the function \usepackage[utf8]{inputenc} used for and why we should add this in latex document?

The inputenc package allows you to tell LaTeX about the input (file) encoding of your TeX document. The input encoding controls how the various characters you type are stored in your document (...
user avatar
  • 159k
15 votes
Accepted

How to easily use UTF-8 with LaTeX?

You can use XeLaTeX, but inputenc shouldn't be loaded. Instead use fontspec and define a font that has the required glyphs. Say you have installed the XITS fonts on your system; then you can do \...
user avatar
  • 993k
15 votes
Accepted

utf8 inputenc vs. babel

As Psyconaut points out an updated version of magyar.ldf is now available on CTAN fixing the problem. There is some mistake in the tests for input encodings in magyar.ldf. You get the same error ...
user avatar
15 votes
Accepted

How to fix Package inputenc Error: "Unicode char \u8:� not set up for use with LaTeX."?

I managed to fix this on my own. The problem was that my .tex file used utf-8 encoding, but my .bib file used ANSI-encoding. The error presented itself, when I added a bibliography entry which ...
user avatar
  • 341
15 votes
Accepted

How do I prevent "s from turning into ß with babel?

The character " should never be used in running text to denote quotes. For double English quotes, use ``Test'' s If you want German style quotes, use "`Test"' s With UTF-8 input, you can use “...
user avatar
  • 993k
14 votes
Accepted

Package *selinput* | Recommended for LaTeX Beginners?

No. Time has moved on and I wouldn't recommend this package to beginners, or use it in my documents. Given the author, it is of course technically good at solving the problem it tries to solve but... ...
user avatar
13 votes
Accepted

Non-ascii character as argument

You can do this, but I'm not sure you should:-) \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} %\newcommand\<[1]{\textbf{#1}} \makeatletter \def\<{\expandafter\zz}...
user avatar
13 votes
Accepted

Text encoding driving me crazy

If the file is saved in UTF-8, then just use \usepackage[utf8]{inputenc} If you are saving the file in ISO Latin 9, then \usepackage[latin9]{inputenc} If you do not know the encoding of the file, ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible