Can lstlisting latex display output code using English characters rather than non-English ones?

To assign a custom output or log file to a nohup command, the following command can be used:
This command allows for the creation of a personalized file to store both the job or command logs and the command logs. Typically, the default file created by the nohup command is named nohup.out.


Question:

I’m trying to include Ansys APDL code in my thesis using begin{lstlisting}, as I have the necessary package. However, my default language is Greek due to
Thesis template
and when I compile the code in LaTeX, it shows Greek characters in the output. I attempted to use eng{} inside or outside of the begin{lstlisting}, but the Greek characters persisted. Here’s the code I’m working with:

begin{lstlisting}
/AUX15  
/UNITS,SI 
IOPTN,IGES,SMOOTH   
IOPTN,MERGE,YES 
IOPTN,SOLID,YES 
IOPTN,SMALL,YES 
IOPTN,GTOLER, DEFA  
IGESIN,'.arc_nosup_2','igs',' '  
! APLOT   
!*  
FINISH 
end{lstlisting}

Does anyone know how to obtain English characters as the output of this code instead of Greek ones?

a minimal example is like that :

documentclass[11pt,a4paper,fleqn]{article}
usepackage{multicol}
usepackage{xspace}
usepackage[unicode,linktocpage,breaklinks]{hyperref}
usepackage{textcomp}
usepackage{breakurl}
% >> Math package:
usepackage{amsmath}
usepackage{amsbsy}
usepackage{amstext}
usepackage{amssymb}
usepackage{nicefrac}
usepackage[english,greek]{babel}
usepackage[utf8x]{inputenc}
%usepackage[iso-8859-7]{inputenc}
%usepackage{kerkis}
usepackage{parskip}
% improved layout of figure captions with extra margin, smaller font than text
usepackage[margin=10pt,font=small,labelfont=bf,textfont = it]{caption}
%usepackage{xltxtra}
usepackage{graphicx}
usepackage{latexsym}
usepackage{babel,varioref}
usepackage{setspace}
usepackage{subcaption}
usepackage{fixltx2e}
usepackage{pstricks}
usepackage{latexsym} 
usepackage{multirow}
usepackage{array}
usepackage{color}
usepackage{algorithm}
usepackage{algorithmicx}
usepackage{algpseudocode}
usepackage{listings}
usepackage{enumerate}
usepackage{babelbib}
usepackage{url}
% usepackage{multibib}
usepackage{caption}
% TABLE OF CONTENTS PACKAGES
usepackage[subfigure]{tocloft}
usepackage{tocbibind}
% Line Spacing
usepackage{setspace}
% fancy header
usepackage{fancyhdr} 
%usepackage[unicode]{hyperref}
% footnotes: waring in case of splitted footnote
usepackage{fnbreak}
% extra controlabity for enumerators
usepackage{enumitem}
% Section headings format
usepackage{titlesec}
%usepackage{sectsty}
% appendix
usepackage{appendix}
begin{lstlisting}
/AUX15  
/UNITS,SI 
IOPTN,IGES,SMOOTH   
IOPTN,MERGE,YES 
IOPTN,SOLID,YES 
IOPTN,SMALL,YES 
IOPTN,GTOLER, DEFA  
IGESIN,'.arc_nosup_2','igs',' '  
! APLOT   
!*  
FINISH
end{lstlisting}


Solution:

Temporarily switch to English by utilizing the code

selectlanguage{english}


.

documentclass[11pt,a4paper,fleqn]{article}
usepackage{multicol}
usepackage{xspace}
usepackage[unicode,linktocpage,breaklinks]{hyperref}
usepackage{textcomp}
usepackage{breakurl}
% >> Math package:
usepackage{amsmath}
usepackage{amsbsy}
usepackage{amstext}
usepackage{amssymb}
usepackage{nicefrac}
usepackage[english,greek]{babel}
usepackage[utf8x]{inputenc}
%usepackage[iso-8859-7]{inputenc}
%usepackage{kerkis}
usepackage{parskip}
% improved layout of figure captions with extra margin, smaller font than text
usepackage[margin=10pt,font=small,labelfont=bf,textfont = it]{caption}
%usepackage{xltxtra}
usepackage{graphicx}
usepackage{latexsym}
usepackage{babel,varioref}
usepackage{setspace}
usepackage{subcaption}
usepackage{fixltx2e}
usepackage{pstricks}
usepackage{latexsym} 
usepackage{multirow}
usepackage{array}
usepackage{color}
usepackage{algorithm}
usepackage{algorithmicx}
usepackage{algpseudocode}
usepackage{listings}
usepackage{enumerate}
usepackage{babelbib}
usepackage{url}
% usepackage{multibib}
usepackage{caption}
% TABLE OF CONTENTS PACKAGES
usepackage[subfigure]{tocloft}
usepackage{tocbibind}
% Line Spacing
usepackage{setspace}
% fancy header
usepackage{fancyhdr} 
%usepackage[unicode]{hyperref}
% footnotes: waring in case of splitted footnote
usepackage{fnbreak}
% extra controlabity for enumerators
usepackage{enumitem}
% Section headings format
usepackage{titlesec}
%usepackage{sectsty}
% appendix
usepackage{appendix}
begin{document}
Greek
{
selectlanguage{english}
begin{lstlisting}
/AUX15  
/UNITS,SI 
IOPTN,IGES,SMOOTH   
IOPTN,MERGE,YES 
IOPTN,SOLID,YES 
IOPTN,SMALL,YES 
IOPTN,GTOLER, DEFA  
IGESIN,'.arc_nosup_2','igs',' '  
! APLOT   
!*  
FINISH
end{lstlisting}
}
Greek
end{document}

Frequently Asked Questions