Converting Mac Roman character to equivalent UTF-8

If your editor isn’t showing it correctly when you specify the encoding, you have given it the wrong encoding. You need to figure what encoding you really have.

You appear to have a byte valued 0xE9 where you need a Unicode LATIN SMALL LETTER E WITH ACUTE character. A MacRoman 0xE9 byte is a LATIN CAPITAL LETTER E WITH GRAVE character, which is what your editor is displaying because you said it was MacRoman. But it is not.

However, Unicode code point U+00E9 is indeed LATIN SMALL LETTER E WITH ACUTE.

Therefore, it is not MacRoman that you have there, but almost certainly ISO-8859-1 or ISO-8859-15.

So use something like

$ iconv -f ISO-8859-1 -t UTF-8 < input.latin1 > output.utf8

to do the conversion.


To actually answer the question "Converting Mac Roman character to equivalent UTF-8"

Convert the encoding of the file from Mac OS Roman to UTF-8:

$ iconv -f macintosh -t UTF-8 < INPUT_FILE_PATH > OUTPUT_FILE_PATH