[pdftex] How to handle different tex encoding files?

Jaime E. Villate villate at fe.up.pt
Fri Feb 23 12:31:12 CET 2007

This question is off-topic in this list (pdftex); in any case, here
goes an answer, with apologies to the list.

On Thu, 2007-02-22 at 13:35 -0800, Gengis Kanhg Toledo Ramírez wrote:
> Yesterday I copy text from a PDF and paste it to one
> latex file. When I tried to save the file with emacs it ask me about
> bad encoding, so I should select one encoding from a list. I pause
> the saving opperation and search the web for "what to do?", I didn't
> find any help so I had to decide, so I select "emacs-mule" encoding
> (mule=Multi Language encoding)

that was a mistake. You should have selected latin-1-unix.
You can correct the problem easily: open the file again with Emacs
and follow this sequence of menus:
  Options -> Mule -> Set Coding System -> For Saving this Buffer
or, if you are an Emacs purist:
  C-x RET f
then, write down latin-1-unix
You will notice that ** appears in the status bar, indicating that the
buffer has been changed and needs to be saved again.

How did I know that you had to use latin 1? because according to
the error message, you might have \usepackage[latin1]{inputenc}
in your preamble. Notice that it is now recommended to move into
UTF8 which is more general. To do that you can use
\usepackage[utf8]{inputenc] an save all your files in UTF8. An easier
way to convert to a different encoding, without having to open
the file with Emacs, is using the program iconv.

Jaime Villate

P.S. congratulations on your thesis, I'm very interested in Maglev.

More information about the pdftex mailing list