# inputenc when we write in english

I will submit a paper in mathematic to a journal. I write it in english.

Can I delete the following code

 \usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}


Or I should replace it by another codes?

I ask this question, because some times when I want to open my tex file, I couldn't open it and I get this message. But when I change the folder of my tex file, it will be opened without any problem.

Thank you!

• you should keep T1 and use whatever input encoding you use: utf8 in preference to latin1, or if you only use ascii input then you can drop inputenc – David Carlisle Jan 1 '18 at 12:17
• the simplest thing is to write exactly what you wrote, unless you have a specific reason to change it. – David Carlisle Jan 1 '18 at 12:24
• Thank you: that is I use the following code? :\usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} because some times I find problems with 'inputenc' when I write in french – Student Jan 1 '18 at 12:32
• that is a completely separate issue, using non-ascii caracters in file names, it is simplest just not to do that. There is absolutely no way anyone could have guessed that was the issue from your original question. that is why questions should always have a complete test document, and if they are about an error message have the complete error (preferably as text from the log file, not as an image) – David Carlisle Jan 1 '18 at 12:41
• your image also shows you are using \bf don't do that! – David Carlisle Jan 1 '18 at 12:42

If your document really is saved in latin1 (ISO-8859-1) encoding then it is perfectly OK to leave

 \usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}


however latin1 is mostly regarded as a "legacy" encoding, and most operating systems and editors will (or should) default to UTF-8 (Unicode) encoding these days. If using UTF-8 then the lines should be

 \usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}


If you can guarantee that you only use ASCII input then ASCII, UTF-8 and latin1 are the same encoding in that range so it doesn't really matter, you could delete the inputenc line but it is probably better to still specify the encoding your editor is using (which most likely is UTF-8 as noted above).

You should keep the T1 fontenc line unless you have specific reason to remove it.

As David stated utf-8 is preferable to latin1, to get this you should write

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}


\usepackage[latin1]{inputenc}

\usepackage[T1]{fontenc}