Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'utf-8' codec can't decode byte 0xd0 error when using bulgarian #6

Open
dimitargslavchev opened this issue Oct 8, 2021 · 3 comments

Comments

@dimitargslavchev
Copy link

Copied from Stack Exchange https://tex.stackexchange.com/questions/618224/utf-8-codec-cant-decode-byte-0xd0

I get the following error trying to compile a file with bulgarian text on Ubuntu 20.04 with tex-live. I use kile to compile.

Traceback (most recent call last):
  File "/usr/bin/texliveonfly", line 360, in <module>
    (output, returnCode)  = compileTex()
  File "/usr/bin/texliveonfly", line 277, in compileTexDoc
    return readFromProcess(process)
  File "/usr/bin/texliveonfly", line 292, in readFromProcess
    line = getProcessLine()
  File "/usr/bin/texliveonfly", line 285, in <lambda>
    getProcessLine = lambda : frombytesifpy3(process.stdout.readline())
  File "/usr/bin/texliveonfly", line 44, in <lambda>
    frombytesifpy3 = lambda b = None : b.decode("UTF-8") if py3 and b != None else b
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 19: invalid continuation byte

Minimum example:

\documentclass[a4paper]{report}
\usepackage[T2A,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english, bulgarian]{babel}

\begin{document}

\begin{enumerate}
 \item {\em Решение.} Тази стъпка използва компресираната и 
 факторизирана матрица от коефициенти на системата и дясната страна,
 за намиране на решението. Изчислителната сложност на тази стъпка 
 е $O(rn)$. 
\end{enumerate}

\end{document}

If I add an empty line between the \item row and the next, it compiles, but that adds an unwanted new paragraph and in the actual file I have other code that breaks it too.

I.e. if I change \item as below it will suddenly start compiling:

...
\begin{enumerate}
 \item {\em Решение.} Тази стъпка използва компресираната и 

 факторизирана матрица от коефициенти на системата и дясната страна,
 за намиране на решението. Изчислителната сложност на тази стъпка 
 е $O(rn)$. 
\end{enumerate}
...

I am on Ubuntu 20.04.3 LTS with tex-live and have just upgraded from 18.04. On another computer with Ubuntu 20.04 same text compiles without a problem as a part of a bigger file.

Full Output log of the compile command:

*****
*****     PDFLaTeX output: 
*****     cd "/home/iict/Documents/test_not_working"
*****     texliveonfly -a -interaction=nonstopmode not_working.tex
*****
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./not_working.tex
LaTeX2e <2020-02-02> patch level 2
L3 programming layer <2020-02-14>
(/usr/share/texlive/texmf-dist/tex/latex/base/report.cls
Document Class: report 2019/12/20 v1.4l Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/cyrillic/t2aenc.def
(/usr/share/texlive/texmf-dist/tex/latex/base/t2aenc.dfu)))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty)
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def)
(/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def
(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def)))
(/usr/share/texlive/texmf-dist/tex/generic/babel-bulgarian/bulgarian.ldf))
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def)
(./not_working.aux (/usr/share/texlive/texmf-dist/tex/latex/cyrillic/t2acmr.fd)
)
Overfull \hbox (0.53506pt too wide) in paragraph at lines 9--13
Traceback (most recent call last):
  File "/usr/bin/texliveonfly", line 360, in <module>
    (output, returnCode)  = compileTex()
  File "/usr/bin/texliveonfly", line 277, in compileTexDoc
    return readFromProcess(process)
  File "/usr/bin/texliveonfly", line 292, in readFromProcess
    line = getProcessLine()
  File "/usr/bin/texliveonfly", line 285, in <lambda>
    getProcessLine = lambda : frombytesifpy3(process.stdout.readline())
  File "/usr/bin/texliveonfly", line 44, in <lambda>
    frombytesifpy3 = lambda b = None : b.decode("UTF-8") if py3 and b != None else b
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 19: invalid continuation byte
@DanySK
Copy link

DanySK commented Feb 21, 2022

I reproduced this issue with Italian as well.

@brdann
Copy link

brdann commented May 8, 2023

Reproduced this with russian text on windows 11 machine fresh texlive installation. Can't compile my files :( anything I can do with this?

@dimitargslavchev
Copy link
Author

Reproduced this with russian text on windows 11 machine fresh texlive installation. Can't compile my files :( anything I can do with this?

I stopped using it. The regular tex compilers work fine.

You can install all tex packages and then it will not complain about missing packages. They don't take that much space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants