Writing Cyrillic text to a file

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2















could you explain, what is going on?



I am using the latest MiKTeX 2.9.6960 64-bit version (installed just yesterday).



I am trying to write some Cyrillic text to the separate file without using inputenc package:



documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwriteБбббббббббббб

immediatecloseouttestwrite

enddocument


But LaTeX does not tell me that there is something wrong with encoding, but instead of this it tells me that some its internal commands are undefined. Here is a part of the corresponding log-file:



! Undefined control sequence.
GenericError ...
#4 errhelp @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
let @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
@empty def MessageBreak...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
endgroup
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
#4 errhelp @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
let @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
@empty def MessageBreak...
l.9 immediatewritetestwriteБбббббббббббб


and so on.



Is it a bug or what is going on?



Thank for your answers.










share|improve this question



















  • 1





    I suppose you are using pdfTeX, in which case Cyrillic characters aren't plain characters, but active ones. TeX expands characters when writing to a file, but you haven't declared any encoding for them. You'd have to use some verbatim approach to avoid the expansion of these characters, like the detokenize approach David just posted, the filecontents environment, or the verbwrite command I created here.

    – Phelype Oleinik
    Feb 28 at 15:49
















2















could you explain, what is going on?



I am using the latest MiKTeX 2.9.6960 64-bit version (installed just yesterday).



I am trying to write some Cyrillic text to the separate file without using inputenc package:



documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwriteБбббббббббббб

immediatecloseouttestwrite

enddocument


But LaTeX does not tell me that there is something wrong with encoding, but instead of this it tells me that some its internal commands are undefined. Here is a part of the corresponding log-file:



! Undefined control sequence.
GenericError ...
#4 errhelp @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
let @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
@empty def MessageBreak...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
endgroup
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
#4 errhelp @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
let @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
@empty def MessageBreak...
l.9 immediatewritetestwriteБбббббббббббб


and so on.



Is it a bug or what is going on?



Thank for your answers.










share|improve this question



















  • 1





    I suppose you are using pdfTeX, in which case Cyrillic characters aren't plain characters, but active ones. TeX expands characters when writing to a file, but you haven't declared any encoding for them. You'd have to use some verbatim approach to avoid the expansion of these characters, like the detokenize approach David just posted, the filecontents environment, or the verbwrite command I created here.

    – Phelype Oleinik
    Feb 28 at 15:49














2












2








2








could you explain, what is going on?



I am using the latest MiKTeX 2.9.6960 64-bit version (installed just yesterday).



I am trying to write some Cyrillic text to the separate file without using inputenc package:



documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwriteБбббббббббббб

immediatecloseouttestwrite

enddocument


But LaTeX does not tell me that there is something wrong with encoding, but instead of this it tells me that some its internal commands are undefined. Here is a part of the corresponding log-file:



! Undefined control sequence.
GenericError ...
#4 errhelp @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
let @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
@empty def MessageBreak...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
endgroup
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
#4 errhelp @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
let @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
@empty def MessageBreak...
l.9 immediatewritetestwriteБбббббббббббб


and so on.



Is it a bug or what is going on?



Thank for your answers.










share|improve this question
















could you explain, what is going on?



I am using the latest MiKTeX 2.9.6960 64-bit version (installed just yesterday).



I am trying to write some Cyrillic text to the separate file without using inputenc package:



documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwriteБбббббббббббб

immediatecloseouttestwrite

enddocument


But LaTeX does not tell me that there is something wrong with encoding, but instead of this it tells me that some its internal commands are undefined. Here is a part of the corresponding log-file:



! Undefined control sequence.
GenericError ...
#4 errhelp @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
let @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
@empty def MessageBreak...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
endgroup
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
#4 errhelp @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
let @err@ ...
l.9 immediatewritetestwriteБбббббббббббб

?
! Undefined control sequence.
GenericError ...
@empty def MessageBreak...
l.9 immediatewritetestwriteБбббббббббббб


and so on.



Is it a bug or what is going on?



Thank for your answers.







errors auxiliary-files cyrillic






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 28 at 16:17









David Carlisle

496k4111431890




496k4111431890










asked Feb 28 at 15:39









Andrei MalokostovAndrei Malokostov

111




111







  • 1





    I suppose you are using pdfTeX, in which case Cyrillic characters aren't plain characters, but active ones. TeX expands characters when writing to a file, but you haven't declared any encoding for them. You'd have to use some verbatim approach to avoid the expansion of these characters, like the detokenize approach David just posted, the filecontents environment, or the verbwrite command I created here.

    – Phelype Oleinik
    Feb 28 at 15:49













  • 1





    I suppose you are using pdfTeX, in which case Cyrillic characters aren't plain characters, but active ones. TeX expands characters when writing to a file, but you haven't declared any encoding for them. You'd have to use some verbatim approach to avoid the expansion of these characters, like the detokenize approach David just posted, the filecontents environment, or the verbwrite command I created here.

    – Phelype Oleinik
    Feb 28 at 15:49








1




1





I suppose you are using pdfTeX, in which case Cyrillic characters aren't plain characters, but active ones. TeX expands characters when writing to a file, but you haven't declared any encoding for them. You'd have to use some verbatim approach to avoid the expansion of these characters, like the detokenize approach David just posted, the filecontents environment, or the verbwrite command I created here.

– Phelype Oleinik
Feb 28 at 15:49






I suppose you are using pdfTeX, in which case Cyrillic characters aren't plain characters, but active ones. TeX expands characters when writing to a file, but you haven't declared any encoding for them. You'd have to use some verbatim approach to avoid the expansion of these characters, like the detokenize approach David just posted, the filecontents environment, or the verbwrite command I created here.

– Phelype Oleinik
Feb 28 at 15:49











2 Answers
2






active

oldest

votes


















6














The active characters are set up to expand to typesetting instructions (or to error messages saying that the character is not set up) you just want to write the text verbatim so:



documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwritedetokenizeБбббббббббббб

immediatecloseouttestwrite

enddocument





share|improve this answer























  • Thank you so much, but as already I wrote below to Ulrike Fischer, my question was "Why LateX letts me that some its internal commands which are absolutely not related to my code are undefined". If I write Cyrillic text as a text, LaTeX tells me that Cyrillic letters have wrong Unicode codes. But if the Cyrillic text is inside write..., Latex tells me that GenericError command or some other comands inside it are undefined.

    – Andrei Malokostov
    Feb 28 at 18:36






  • 1





    @AndreiMalokostov you are using a write command, which expands its argument completly without any precautions. It is easy to get such error messages with it if you put commands in its argument. If you want a better error message use makeatletter immediateprotected@write....

    – Ulrike Fischer
    Feb 28 at 18:50











  • OK, thank you so much. I thought from my 25+ year experience that TeX (and LateX also) have very good system of error messages, and these messages are quite informative. So I was very confused to get such strange (from my point of view) messages. But if you suppose that it is all OK with them, I will trust you. But in any case I would prefer to obtain from LateX something like "If all else fails, read the instructions" :-) In any case thank you so much for you answers and for your attention.

    – Andrei Malokostov
    Feb 28 at 19:10











  • @AndreiMalokostov unfortunately the error occurs while tex is writing the file and it really can't stop and make a sensible latex-specified error at that point if it fails it just fails with some more or less spurious low level error.

    – David Carlisle
    Feb 28 at 19:26



















5














If you don't want to use inputenc, add UseRawInputEncoding



UseRawInputEncoding
documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwriteБбббббббббббб

immediatecloseouttestwrite

enddocument





share|improve this answer























  • Thank you so much, and thank you for your recommendations. But my question is NOT about "How to avoid such error messages", but "Why LaTeX responda in such a way and why it tells me that GenericError command (or some other command inside the definition of GenericError) are undefined?". I know other ways to avoid such error messages. For example I can declare newtoksBbbbtoks, assign Bbbbtoks=Ббббббб and then use the command writetestwritetheBbbbtoks, this works well. But I would like to get an answer to my second question.

    – Andrei Malokostov
    Feb 28 at 18:28












  • If you are interested in the processing of the active chars (Б and б are now active and so commands) then I would suggest that you add tracingmacros=1 and then look in the log file. If you want to know why they are active you could read this latex news letter: latex-project.org/news/latex2e-news/ltnews28.pdf

    – Ulrike Fischer
    Feb 28 at 18:34











  • OK, thank you so much. I will try to use tracingmacros=1 understand, how commands like "Б" or "б" are transformed to the error messages of the type ! Undefined control sequence. GenericError ... let @err@ ...

    – Andrei Malokostov
    Feb 28 at 18:51










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477164%2fwriting-cyrillic-text-to-a-file%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









6














The active characters are set up to expand to typesetting instructions (or to error messages saying that the character is not set up) you just want to write the text verbatim so:



documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwritedetokenizeБбббббббббббб

immediatecloseouttestwrite

enddocument





share|improve this answer























  • Thank you so much, but as already I wrote below to Ulrike Fischer, my question was "Why LateX letts me that some its internal commands which are absolutely not related to my code are undefined". If I write Cyrillic text as a text, LaTeX tells me that Cyrillic letters have wrong Unicode codes. But if the Cyrillic text is inside write..., Latex tells me that GenericError command or some other comands inside it are undefined.

    – Andrei Malokostov
    Feb 28 at 18:36






  • 1





    @AndreiMalokostov you are using a write command, which expands its argument completly without any precautions. It is easy to get such error messages with it if you put commands in its argument. If you want a better error message use makeatletter immediateprotected@write....

    – Ulrike Fischer
    Feb 28 at 18:50











  • OK, thank you so much. I thought from my 25+ year experience that TeX (and LateX also) have very good system of error messages, and these messages are quite informative. So I was very confused to get such strange (from my point of view) messages. But if you suppose that it is all OK with them, I will trust you. But in any case I would prefer to obtain from LateX something like "If all else fails, read the instructions" :-) In any case thank you so much for you answers and for your attention.

    – Andrei Malokostov
    Feb 28 at 19:10











  • @AndreiMalokostov unfortunately the error occurs while tex is writing the file and it really can't stop and make a sensible latex-specified error at that point if it fails it just fails with some more or less spurious low level error.

    – David Carlisle
    Feb 28 at 19:26
















6














The active characters are set up to expand to typesetting instructions (or to error messages saying that the character is not set up) you just want to write the text verbatim so:



documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwritedetokenizeБбббббббббббб

immediatecloseouttestwrite

enddocument





share|improve this answer























  • Thank you so much, but as already I wrote below to Ulrike Fischer, my question was "Why LateX letts me that some its internal commands which are absolutely not related to my code are undefined". If I write Cyrillic text as a text, LaTeX tells me that Cyrillic letters have wrong Unicode codes. But if the Cyrillic text is inside write..., Latex tells me that GenericError command or some other comands inside it are undefined.

    – Andrei Malokostov
    Feb 28 at 18:36






  • 1





    @AndreiMalokostov you are using a write command, which expands its argument completly without any precautions. It is easy to get such error messages with it if you put commands in its argument. If you want a better error message use makeatletter immediateprotected@write....

    – Ulrike Fischer
    Feb 28 at 18:50











  • OK, thank you so much. I thought from my 25+ year experience that TeX (and LateX also) have very good system of error messages, and these messages are quite informative. So I was very confused to get such strange (from my point of view) messages. But if you suppose that it is all OK with them, I will trust you. But in any case I would prefer to obtain from LateX something like "If all else fails, read the instructions" :-) In any case thank you so much for you answers and for your attention.

    – Andrei Malokostov
    Feb 28 at 19:10











  • @AndreiMalokostov unfortunately the error occurs while tex is writing the file and it really can't stop and make a sensible latex-specified error at that point if it fails it just fails with some more or less spurious low level error.

    – David Carlisle
    Feb 28 at 19:26














6












6








6







The active characters are set up to expand to typesetting instructions (or to error messages saying that the character is not set up) you just want to write the text verbatim so:



documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwritedetokenizeБбббббббббббб

immediatecloseouttestwrite

enddocument





share|improve this answer













The active characters are set up to expand to typesetting instructions (or to error messages saying that the character is not set up) you just want to write the text verbatim so:



documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwritedetokenizeБбббббббббббб

immediatecloseouttestwrite

enddocument






share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 28 at 15:48









David CarlisleDavid Carlisle

496k4111431890




496k4111431890












  • Thank you so much, but as already I wrote below to Ulrike Fischer, my question was "Why LateX letts me that some its internal commands which are absolutely not related to my code are undefined". If I write Cyrillic text as a text, LaTeX tells me that Cyrillic letters have wrong Unicode codes. But if the Cyrillic text is inside write..., Latex tells me that GenericError command or some other comands inside it are undefined.

    – Andrei Malokostov
    Feb 28 at 18:36






  • 1





    @AndreiMalokostov you are using a write command, which expands its argument completly without any precautions. It is easy to get such error messages with it if you put commands in its argument. If you want a better error message use makeatletter immediateprotected@write....

    – Ulrike Fischer
    Feb 28 at 18:50











  • OK, thank you so much. I thought from my 25+ year experience that TeX (and LateX also) have very good system of error messages, and these messages are quite informative. So I was very confused to get such strange (from my point of view) messages. But if you suppose that it is all OK with them, I will trust you. But in any case I would prefer to obtain from LateX something like "If all else fails, read the instructions" :-) In any case thank you so much for you answers and for your attention.

    – Andrei Malokostov
    Feb 28 at 19:10











  • @AndreiMalokostov unfortunately the error occurs while tex is writing the file and it really can't stop and make a sensible latex-specified error at that point if it fails it just fails with some more or less spurious low level error.

    – David Carlisle
    Feb 28 at 19:26


















  • Thank you so much, but as already I wrote below to Ulrike Fischer, my question was "Why LateX letts me that some its internal commands which are absolutely not related to my code are undefined". If I write Cyrillic text as a text, LaTeX tells me that Cyrillic letters have wrong Unicode codes. But if the Cyrillic text is inside write..., Latex tells me that GenericError command or some other comands inside it are undefined.

    – Andrei Malokostov
    Feb 28 at 18:36






  • 1





    @AndreiMalokostov you are using a write command, which expands its argument completly without any precautions. It is easy to get such error messages with it if you put commands in its argument. If you want a better error message use makeatletter immediateprotected@write....

    – Ulrike Fischer
    Feb 28 at 18:50











  • OK, thank you so much. I thought from my 25+ year experience that TeX (and LateX also) have very good system of error messages, and these messages are quite informative. So I was very confused to get such strange (from my point of view) messages. But if you suppose that it is all OK with them, I will trust you. But in any case I would prefer to obtain from LateX something like "If all else fails, read the instructions" :-) In any case thank you so much for you answers and for your attention.

    – Andrei Malokostov
    Feb 28 at 19:10











  • @AndreiMalokostov unfortunately the error occurs while tex is writing the file and it really can't stop and make a sensible latex-specified error at that point if it fails it just fails with some more or less spurious low level error.

    – David Carlisle
    Feb 28 at 19:26

















Thank you so much, but as already I wrote below to Ulrike Fischer, my question was "Why LateX letts me that some its internal commands which are absolutely not related to my code are undefined". If I write Cyrillic text as a text, LaTeX tells me that Cyrillic letters have wrong Unicode codes. But if the Cyrillic text is inside write..., Latex tells me that GenericError command or some other comands inside it are undefined.

– Andrei Malokostov
Feb 28 at 18:36





Thank you so much, but as already I wrote below to Ulrike Fischer, my question was "Why LateX letts me that some its internal commands which are absolutely not related to my code are undefined". If I write Cyrillic text as a text, LaTeX tells me that Cyrillic letters have wrong Unicode codes. But if the Cyrillic text is inside write..., Latex tells me that GenericError command or some other comands inside it are undefined.

– Andrei Malokostov
Feb 28 at 18:36




1




1





@AndreiMalokostov you are using a write command, which expands its argument completly without any precautions. It is easy to get such error messages with it if you put commands in its argument. If you want a better error message use makeatletter immediateprotected@write....

– Ulrike Fischer
Feb 28 at 18:50





@AndreiMalokostov you are using a write command, which expands its argument completly without any precautions. It is easy to get such error messages with it if you put commands in its argument. If you want a better error message use makeatletter immediateprotected@write....

– Ulrike Fischer
Feb 28 at 18:50













OK, thank you so much. I thought from my 25+ year experience that TeX (and LateX also) have very good system of error messages, and these messages are quite informative. So I was very confused to get such strange (from my point of view) messages. But if you suppose that it is all OK with them, I will trust you. But in any case I would prefer to obtain from LateX something like "If all else fails, read the instructions" :-) In any case thank you so much for you answers and for your attention.

– Andrei Malokostov
Feb 28 at 19:10





OK, thank you so much. I thought from my 25+ year experience that TeX (and LateX also) have very good system of error messages, and these messages are quite informative. So I was very confused to get such strange (from my point of view) messages. But if you suppose that it is all OK with them, I will trust you. But in any case I would prefer to obtain from LateX something like "If all else fails, read the instructions" :-) In any case thank you so much for you answers and for your attention.

– Andrei Malokostov
Feb 28 at 19:10













@AndreiMalokostov unfortunately the error occurs while tex is writing the file and it really can't stop and make a sensible latex-specified error at that point if it fails it just fails with some more or less spurious low level error.

– David Carlisle
Feb 28 at 19:26






@AndreiMalokostov unfortunately the error occurs while tex is writing the file and it really can't stop and make a sensible latex-specified error at that point if it fails it just fails with some more or less spurious low level error.

– David Carlisle
Feb 28 at 19:26












5














If you don't want to use inputenc, add UseRawInputEncoding



UseRawInputEncoding
documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwriteБбббббббббббб

immediatecloseouttestwrite

enddocument





share|improve this answer























  • Thank you so much, and thank you for your recommendations. But my question is NOT about "How to avoid such error messages", but "Why LaTeX responda in such a way and why it tells me that GenericError command (or some other command inside the definition of GenericError) are undefined?". I know other ways to avoid such error messages. For example I can declare newtoksBbbbtoks, assign Bbbbtoks=Ббббббб and then use the command writetestwritetheBbbbtoks, this works well. But I would like to get an answer to my second question.

    – Andrei Malokostov
    Feb 28 at 18:28












  • If you are interested in the processing of the active chars (Б and б are now active and so commands) then I would suggest that you add tracingmacros=1 and then look in the log file. If you want to know why they are active you could read this latex news letter: latex-project.org/news/latex2e-news/ltnews28.pdf

    – Ulrike Fischer
    Feb 28 at 18:34











  • OK, thank you so much. I will try to use tracingmacros=1 understand, how commands like "Б" or "б" are transformed to the error messages of the type ! Undefined control sequence. GenericError ... let @err@ ...

    – Andrei Malokostov
    Feb 28 at 18:51















5














If you don't want to use inputenc, add UseRawInputEncoding



UseRawInputEncoding
documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwriteБбббббббббббб

immediatecloseouttestwrite

enddocument





share|improve this answer























  • Thank you so much, and thank you for your recommendations. But my question is NOT about "How to avoid such error messages", but "Why LaTeX responda in such a way and why it tells me that GenericError command (or some other command inside the definition of GenericError) are undefined?". I know other ways to avoid such error messages. For example I can declare newtoksBbbbtoks, assign Bbbbtoks=Ббббббб and then use the command writetestwritetheBbbbtoks, this works well. But I would like to get an answer to my second question.

    – Andrei Malokostov
    Feb 28 at 18:28












  • If you are interested in the processing of the active chars (Б and б are now active and so commands) then I would suggest that you add tracingmacros=1 and then look in the log file. If you want to know why they are active you could read this latex news letter: latex-project.org/news/latex2e-news/ltnews28.pdf

    – Ulrike Fischer
    Feb 28 at 18:34











  • OK, thank you so much. I will try to use tracingmacros=1 understand, how commands like "Б" or "б" are transformed to the error messages of the type ! Undefined control sequence. GenericError ... let @err@ ...

    – Andrei Malokostov
    Feb 28 at 18:51













5












5








5







If you don't want to use inputenc, add UseRawInputEncoding



UseRawInputEncoding
documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwriteБбббббббббббб

immediatecloseouttestwrite

enddocument





share|improve this answer













If you don't want to use inputenc, add UseRawInputEncoding



UseRawInputEncoding
documentclassarticle

begindocument

newwritetestwrite

immediateopenouttestwrite=testwrite.txt

immediatewritetestwriteБбббббббббббб

immediatecloseouttestwrite

enddocument






share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 28 at 15:51









Ulrike FischerUlrike Fischer

197k8303689




197k8303689












  • Thank you so much, and thank you for your recommendations. But my question is NOT about "How to avoid such error messages", but "Why LaTeX responda in such a way and why it tells me that GenericError command (or some other command inside the definition of GenericError) are undefined?". I know other ways to avoid such error messages. For example I can declare newtoksBbbbtoks, assign Bbbbtoks=Ббббббб and then use the command writetestwritetheBbbbtoks, this works well. But I would like to get an answer to my second question.

    – Andrei Malokostov
    Feb 28 at 18:28












  • If you are interested in the processing of the active chars (Б and б are now active and so commands) then I would suggest that you add tracingmacros=1 and then look in the log file. If you want to know why they are active you could read this latex news letter: latex-project.org/news/latex2e-news/ltnews28.pdf

    – Ulrike Fischer
    Feb 28 at 18:34











  • OK, thank you so much. I will try to use tracingmacros=1 understand, how commands like "Б" or "б" are transformed to the error messages of the type ! Undefined control sequence. GenericError ... let @err@ ...

    – Andrei Malokostov
    Feb 28 at 18:51

















  • Thank you so much, and thank you for your recommendations. But my question is NOT about "How to avoid such error messages", but "Why LaTeX responda in such a way and why it tells me that GenericError command (or some other command inside the definition of GenericError) are undefined?". I know other ways to avoid such error messages. For example I can declare newtoksBbbbtoks, assign Bbbbtoks=Ббббббб and then use the command writetestwritetheBbbbtoks, this works well. But I would like to get an answer to my second question.

    – Andrei Malokostov
    Feb 28 at 18:28












  • If you are interested in the processing of the active chars (Б and б are now active and so commands) then I would suggest that you add tracingmacros=1 and then look in the log file. If you want to know why they are active you could read this latex news letter: latex-project.org/news/latex2e-news/ltnews28.pdf

    – Ulrike Fischer
    Feb 28 at 18:34











  • OK, thank you so much. I will try to use tracingmacros=1 understand, how commands like "Б" or "б" are transformed to the error messages of the type ! Undefined control sequence. GenericError ... let @err@ ...

    – Andrei Malokostov
    Feb 28 at 18:51
















Thank you so much, and thank you for your recommendations. But my question is NOT about "How to avoid such error messages", but "Why LaTeX responda in such a way and why it tells me that GenericError command (or some other command inside the definition of GenericError) are undefined?". I know other ways to avoid such error messages. For example I can declare newtoksBbbbtoks, assign Bbbbtoks=Ббббббб and then use the command writetestwritetheBbbbtoks, this works well. But I would like to get an answer to my second question.

– Andrei Malokostov
Feb 28 at 18:28






Thank you so much, and thank you for your recommendations. But my question is NOT about "How to avoid such error messages", but "Why LaTeX responda in such a way and why it tells me that GenericError command (or some other command inside the definition of GenericError) are undefined?". I know other ways to avoid such error messages. For example I can declare newtoksBbbbtoks, assign Bbbbtoks=Ббббббб and then use the command writetestwritetheBbbbtoks, this works well. But I would like to get an answer to my second question.

– Andrei Malokostov
Feb 28 at 18:28














If you are interested in the processing of the active chars (Б and б are now active and so commands) then I would suggest that you add tracingmacros=1 and then look in the log file. If you want to know why they are active you could read this latex news letter: latex-project.org/news/latex2e-news/ltnews28.pdf

– Ulrike Fischer
Feb 28 at 18:34





If you are interested in the processing of the active chars (Б and б are now active and so commands) then I would suggest that you add tracingmacros=1 and then look in the log file. If you want to know why they are active you could read this latex news letter: latex-project.org/news/latex2e-news/ltnews28.pdf

– Ulrike Fischer
Feb 28 at 18:34













OK, thank you so much. I will try to use tracingmacros=1 understand, how commands like "Б" or "б" are transformed to the error messages of the type ! Undefined control sequence. GenericError ... let @err@ ...

– Andrei Malokostov
Feb 28 at 18:51





OK, thank you so much. I will try to use tracingmacros=1 understand, how commands like "Б" or "б" are transformed to the error messages of the type ! Undefined control sequence. GenericError ... let @err@ ...

– Andrei Malokostov
Feb 28 at 18:51

















draft saved

draft discarded
















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477164%2fwriting-cyrillic-text-to-a-file%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay