1

I am currently switching from a Mac to a Windows Pc. My work on the Mac was written with TeXShop, when I open my .tex file with TeXworks (miktex 2.9) ALL letters with accents or hats are replaced by a black diamond with an inset white question mark. Is there any way I can get the right letters back without having to individually retype them by hand?

(I had a similar problem when looking at .tex files written on a PC and tried to open them on the Mac; however in those documents the letters with accent were not all replaced by the same symbol, i.e. *" would be an é, but *# would be an à etc. In that instance I just "replaced all" in my document.)

  • 1
    It sounds as if you are saving with different encodings on the two systems: the usual one nowadays is UTF-8 in most editors. – Joseph Wright Jan 20 '16 at 12:08
  • 1
    I would not use individual search/replace to fix this as the chance of corrupting the document is high, just go back to the original file and reload it using the correct encoding (whichever encoding it was saved in) the issue is not really related to using different editors. – David Carlisle Jan 20 '16 at 12:15
  • I am using UTF-8 encoding on the Windows computer. I am not sure which encoding is used one the Mac. The following package would always be included in all the files on my Mac: \usepackage[applemac]{inputenc}. – Annick Biver Jan 20 '16 at 12:23
  • Comment before @DavidCarlisle – Annick Biver Jan 20 '16 at 12:46
  • oh so a legacy apple encoding, if you still have the mac easiest would be just to open it up in the editor there and then save as utf-8 before transferring. – David Carlisle Jan 20 '16 at 12:58
3

I would not use individual search/replace to fix this as the chance of corrupting the document is high, just go back to the original file and reload it using the correct encoding (apple legacy 8bit) and then save as UTF-8. The issue is not really related to using different editors.

Having converted the file to UTF-8 you need to change that option to [utf8].

Note that latex itself doesn't need any change to the file, you could use the apple-encoded file unchanged on windows and the output would be fine, it's just inconvenient if you can't find a windows editor that knows that encoding, as it makes reading the source difficult.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.