Answer the question
In order to leave comments, you need to log in
How to print a text file in the desired encoding in CMD?
Hello. I have a PHP script that creates a text file (data.txt). Then I send it to print using the print command. But krakozyabry is printed. How to fix it? Thanks in advance.
Here is the output in the console:
Answer the question
In order to leave comments, you need to log in
Change the encoding in the console:
chcp <encoding number>
By default, the encoding in the console is 866. The type command doesn't do any conversion (unless the file is in UTF with BOM, in which case it converts UTF to console encoding).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question