0

EDIT: going to the options menu, going to the editor section and changing the font enconding from UTF-8 to windows- 1251 fixed the problem thanks, daevid

I'm extremely new to this, having started using TexStudio for an urgent matter since last week and have had no previous experience, prior knowledge or anything like that go off of, so please be patient.

So I have a set of files that I've set up to compile together into one file. Some are at least 5- 6 years old, others I've made in the past few days, the language on them is the same, that being Bulgarian.

The text on some of the old files is seemingly garbled, like this

"Äèñåðòàöèÿòà ñå ñúñòîè îò ïåò ãëàâè - óâîäíà ãëàâà, òðè ãëàâè ïî ñúùåñòâî è çàêëþ÷åíèå. Ïúðâà ãëàâà ñå ñúñòîè îò òðè ÷àñòè, êàêòî ñëåäâà"

However, when texstudio builds a pdf out of it, the text shows up fine on the built PDF. If I try to add any more words to it, the words are displayed as question marks. Symbols are fine, numbers are fine, english text is fine, but cyrillic is broken. This problem also shows up for the bibliography as well.

The old files that don't have this problem seem to work and look fine with no garbled text and when i add anything new to them, the text doesn't show up as question marks.

I've also seen mentions of a "biblatex" when i tried to install it using miktex, it still didn't pop up in texstudio.

Changing the encoding to UTF-8 did not yield any results, as the text still showed up all the same.

Now I do have one main file that contains all the definitions, set up like this

\usepackage{amsmath,amssymb,latexsym}
\usepackage[T2A]{fontenc}
\usepackage[cp1251]{inputenc}
\usepackage[bulgarian, english]{babel}
\usepackage{mathrsfs}
\usepackage{amsthm}
\bibliographystyle{plain}

\usepackage[cp1251]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[english,bulgarian]{babel}
\usepackage{subcaption}

\usepackage{graphicx}
\usepackage{epsfig}

\usepackage{latexsym,amsfonts,amsmath}
\usepackage[cp1251]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[english,bulgarian]{babel}

\usepackage{graphicx}
\usepackage{epsfig}

Also thinking that maybe the version of TexStudio that I was using was outdated, I updated it from 4.1.3 to 4.2.3, that however only ended up causing more damage as one of the files is now all question marks. Not just the output, but the text in the file itself as well.

7
  • 1
    if latex produces correct ouput when you have \usepackage[cp1251]{inputenc} then your file is not in utf-8 set the editor to the windows code page 1251 then you will see the intended characters. Alternatively remove that line and save the file as UTF-8 Commented May 7, 2022 at 17:56
  • by "set the editor to the windows code page" do you mean setup encoding or someting else because if it's the former, after following your instructions i did just that, nothing happened, i saved this change, closed the file and when i opened it again, the garbled text is question marks in both the file and the output
    – Reddimus
    Commented May 7, 2022 at 18:03
  • ok nevermind, i'm an absolute smooth- brain changing the font style in the editor in the options menu did the trick thanks
    – Reddimus
    Commented May 7, 2022 at 18:07
  • save a copy of the file before doing anything else, in case experiments mess up the file even more. If latex is working, then your file is in windows code page 1251 so you should not edit it in an editor set to any other encoding as you will end up with a file that is not correctly in any encoding. I do not have texsudio so I can not help with its encoding options, but a texstudio user will no doubt read this and be able to answer. Commented May 7, 2022 at 18:08
  • yeah, you're right about that. unfortunately, i'm pretty impulsive and forgot to close or at least save a copy of the edited version of the file before doing anything. i just misread what you said at first, but again after going to the options menu, going to the editor section and changing the font enconding got the text to display right. again, thanks.
    – Reddimus
    Commented May 7, 2022 at 18:12

0

You must log in to answer this question.

Browse other questions tagged .