Package inputenc Error: Unicode char \u8 in RStudio

! package inputenc error: unicode char √ (u+221a) (inputenc) not set up for use with latex.
package inputenc error unicode character fi (u+fb01)
package inputenc error: unicode character u 00b4
package inputenc error: unicode character − u+2061
package inputenc error unicode char λ u 39b
how to solve package inputenc error in latex
package inputenc error unicode char u8 not set up for use with latex end frame
package inputenc error: unicode character u+200b inputenc not set up for use with latex

In RStudio, when i go for convert my Markdown file to PDF then it gives me the error:

output file: report.knit.md

! Package inputenc Error: Unicode char \u8: not set up for use with LaTeX.

See the inputenc package documentation for explanation. Type H for immediate help. ...

l.117 performance for 32 automobiles (1973â

Try running pandoc with --latex-engine=xelatex. pandoc.exe: Error producing PDF from TeX source Error: pandoc document conversion failed with error 43 In addition: Warning message: running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS report.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output report.pdf --template "C:\Users\USER\Documents\R\win-library\3.2\rmarkdown\rmd\latex\default.tex" --highlight-style tango --latex-engine pdflatex --variable "geometry:margin=1in"' had status 43 Execution halted

My R version (Windows 7):

R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit)

Given the almost identical error message, I tried following @scoa's suggestion, but putting that line in the YAML header did not change the error, so for whatever reason, Knitr wasn't looking there to determine the LaTex engine. However, next to the "Knit PDF" button in the control bar is a settings menu that allows you to specify the LaTex ending in the "Advanced" pane. This solved the problem for me. It produces a slight variation on the suggestion above, modifying the YAML header thus:

  output:
     pdf_document:
         latex_engine: xelatex

I can see that @scoa may have assumed the YAML output was already formatted this way, but what I was missing was the colon after 'pdf_document'. Using the settings dialogue created the proper syntax in the header.

RStudio version 0.99.896, knitr version 1.12.3.

! Package inputenc Error: Unicode char \u8:γ not set up for use with , Is there a fix for this? The exact error is below: ! Package inputenc Error: Unicode char √ (U+221A) (inputenc) not set up for use with LaTeX. See the inputenc  In RStudio, when i go for convert my Markdown file to PDF then it gives me the error: output file: report.knit.md! Package inputenc Error: Unicode char \u8: not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H for immediate help. l.117 performance for 32 automobiles (1973â

Here is a less technical solution but it worked for me when everything else didn't. Try deleting (after copying your code elsewhere) parts of your file and then kniting it. Then by process of elimination you will be able to narrow it down to the character/s that are causing the problem. Keep in mind there may be multiple occurrences of the problem. To make it easier to find the character the error message gave me the utf code of the character and I was able to look up what it was. Apparently there was a special 'fi' character used five times in the text I copied and pasted from so I looked for and replaced them with a normal 'fi'.

Tidyverse 1.2.1 knitting to PDF issue - tidyverse, It works fine when I knit to html, but R markdown returns the error below when I try to knit to pdf: ! Package inputenc Error: Unicode char  Package inputenc Error: Unicode character − (U+2212) (inputenc) not set up for use with LaTeX. user124578 November 3, 2019, 3:51pm #2 I have found that the issue to do with copying and pasting text from word.

I know I am a bit late for this, but I just had almost the same error (minus the pandoc part).

The problem was that I copy pasted a sentence from wikipedia, which had a dash character which was not utf8 formatted. I replaced the dash and it worked.

Latex fails (with an encoding error) to create a pdf if there are "special" characters in your document, like incorrect whitespace/newline characters, or characters with accents. An easy way to check copy-pasted text is to first paste it into a very basic text editor, like nedit.

Issues knitting to pdf in rmarkdown - R Markdown, The error you get is due to a "no-break space" character, according to what I can gather by copying an pasting your message. This character is not usually set up  Package inputenc Error: Unicode character (U+200E) (inputenc) not set up Stack Exchange Network Stack Exchange network consists of 176 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

inputenc Error: Unicode char \u8: not set up for use with LaTeX, output file: report.knit.md ! Package inputenc Error: Unicode char \u8: not set up for use with LaTeX. See the inputenc package documentation  Package inputenc Error: Unicode char √ (U+221A) (inputenc) not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H for immediate help.

r: Package inputenc Error: Unicode char \u8 in RStudio, in rstudio, when go convert markdown file pdf gives me error: output file: report.​knit.md ! package inputenc error: unicode char \u8: not set use  Package inputenc Error: Unicode char ónpr (U+153) (inputenc) not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help.

r - Package inputenc Error: Unicode char \u8 in RStudio -, In RStudio, quando vado per convertire il mio file Markdown in PDF allora mi dà l'​errore: output file: report.knit.md ! Package inputenc Error: Unicode char \u8:  Package inputenc Error: Unicode char √ (U+221A) (inputenc) not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H for immediate help.

Comments
  • A blind shot, have you defined encoding? \usepackage[utf8]{inputenc}
  • the error message suggests "Try running pandoc with --latex-engine=xelatex". This is done by adding latex_engine: xelatex in the yaml header under output: pdf_document.
  • FYI neither \usepackage[utf8]{inputenc} nor latex_engine: xelatex nor @svannoy's answer worked for me. So this is still an open question, and should have a bounty put on it.
  • Update: I noticed that one of my double quotes (") was copy-pasted from a word processor (e.g., Microsoft Word), which was the culprit. Easy fix. Double-check those double quotes!
  • @warship - thx - did the same - found the errant character - thanks....
  • I used you solution and despite not retrieving errors, it shows plain latex code knitr.v 1.15.1.
  • This is good unless the problem is happening because of something generated by your code.