2

I use auctex plugin for emacs and texlive on both my OSsgnu/linux` and windows. On gnu/linux it works like magic when i try to compile a pdf from a *tex file. On windows (ver. 8.1) if i use cyrillic characters in *tex file name i get this error:

ERROR: Package inputenc Error: Unicode character т (U+0442)

--- TeX said ---
! Package inputenc Error: Unicode character т (U+0442)
--- HELP ---
No help available

*название документа output*
Running `LaTeX' on `тут ошибка' with ``pdflatex  -file-line-error   -interaction=nonstopmode "\input" ^"\^"тут ошибка.tex\^"^"''
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/W32TeX) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2018-12-01>
(c:/texlive/2018/texmf-dist/tex/latex/tools/.tex File ignored)

! Package inputenc Error: Unicode character т (U+0442)
(inputenc)                not set up for use with LaTeX.

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

<*> \input "т
              ут ошибка.tex"

! Package inputenc Error: Unicode character у (U+0443)
(inputenc)                not set up for use with LaTeX.

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

<*> \input "ту
                т ошибка.tex"

! Package inputenc Error: Unicode character т (U+0442)
(inputenc)                not set up for use with LaTeX.

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

<*> \input "тут
                   ошибка.tex"

! Package inputenc Error: Unicode character о (U+043E)
(inputenc)                not set up for use with LaTeX.

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

<*> \input "тут о
                     шибка.tex"

! Package inputenc Error: Unicode character ш (U+0448)
(inputenc)                not set up for use with LaTeX.

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

<*> \input "тут ош
                       ибка.tex"

! Package inputenc Error: Unicode character и (U+0438)
(inputenc)                not set up for use with LaTeX.

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

<*> \input "тут оши
                         бка.tex"

! Package inputenc Error: Unicode character б (U+0431)
(inputenc)                not set up for use with LaTeX.

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

<*> \input "тут ошиб
                           ка.tex"

! Package inputenc Error: Unicode character к (U+043A)
(inputenc)                not set up for use with LaTeX.

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

<*> \input "тут ошибк
                             а.tex"

! Package inputenc Error: Unicode character а (U+0430)
(inputenc)                not set up for use with LaTeX.

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

<*> \input "тут ошибка
                               .tex"

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

<*> \input "тут ошибка.
                                tex"
! Emergency stop.
<*> \input "тут ошибка.tex"

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on .log.

TeX Output exited abnormally with code 1 

The error tells to see inputenc documentation. I double checked that and found nothing can help. MWE

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\begin{document}
Проверка
\end{document}
Siavash
  • 2,813
  • 4
  • 29
  • 42
Gakeze
  • 21
  • 1

1 Answers1

1

I had the same problem but with french characters. I had the following very simple file :

\documentclass[12pt, a4paper, draft]{report}

\usepackage[frenchb]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{microtype}

\usepackage{hyperref}

\title{Rapport de stage ingénieur}
\author{Léonard Tschora}

\begin{document}
\maketitle
C'est le rapport de stage de Léonard

\end{document}

Which caused the following error in emacs :

ERROR: Package inputenc Error: Invalid UTF-8 byte sequence

Since I know this code is supposed to work becaause I already used it with another IDE, I copied and pasted it to Tex Studio, in which it worked fine. This means the problem came from emacs, probably the way it saves the document.

I checked https://www.emacswiki.org/emacs/ChangingEncodings and changed the encoding of my file to utf8 (instead of utf-8), and it actually worked!

Hope this helps!

Leonard
  • 11
  • 1