0

I moved all my files to an external hard drive, then updated my Mac OS to Big Sur (that went awry so I had to erase the hard drive and set it up from scratch). Now I moved all files back to the Mac and tried to open the .tex files using TeXShop. All the umlauts are garbled or have disappeared.

Here is what I tried:

  • I installed XCode and Macports. Nothing changed.
  • I downloaded Aquamacs; here all files look normal and compile without an error.
  • I briefly thought about finding and replacing all the umlauts but realised this is not viable; it would require me to manually fix all my files from the last fifteen years or so (nightmare).
  • I moved some files to a Windows laptop and back to the Mac. No success.
  • I played with the preferences in TeXShop (e.g., selecting and removing "Automatic UTF-8-Mac to UTF-8 conversion" in "Misc"). No success.

The files are all encoded \usepackage[applemac]{inputenc}. I realised going forward I should add % !TEX encoding = UTF-8 Unicode to them but this won't fix the current problem. I have been using this encoding with TeXShop before the update for years before the update to Big Sur (even moving tex files to the very same hard drive and back). So far there has never been a problem.

I looked at TeXShop doesn't remember file encoding and Converting .tex file written in TeXShop (on a Mac) to .tex file which compiles correctly in TeXworks and https://www.macuser.de/threads/vorhandene-dateien-nicht-ueber-osx-auffindbar-fehlerhafte-kodierung-von-dateinamen.707726/ and Umlaut not correctly displayed after Dropbox synchronisation and TeXShop doesn't remember file encoding

Hope I haven't overlooked the solution anywhere.

5
  • 6
    I'm not on a mac and I don't know if and how texshop can handle applemac encoded files. But in the long run you probably should reencode all your files from applemac to utf8 (and then remove the inputenc line). There are tools for this, but better make a backup of the original files first. One can create quite a mess out of the umlauts if one simply "play around" and reencode and reencode again. Commented Jul 13, 2021 at 8:09
  • Thanks! I had used the settings mentioned above before updating the Mac, and they always worked fine. I should probably clarify that.
    – NCH32
    Commented Jul 13, 2021 at 8:11
  • 2
    sure, but the world is changing and utf8 is now the default everywhere. If you want to continue to use an outdated encoding like applemac then you will have to find out how to force your editor and your OS to use it. Commented Jul 13, 2021 at 8:50
  • So you think there is no solution for my problem except manually fixing all the files?
    – NCH32
    Commented Jul 13, 2021 at 9:01
  • I don't know. As I said at the begin I don't have a mac. But I would reencode, I did it myself. Everytime I had to reuse an old file which was still in ansinew I changed it to utf8 (my editor has a menu point for it and it only takes a few seconds). Commented Jul 13, 2021 at 9:18

1 Answer 1

1

First: DON'T do any changes to your files. It sounds as though they are all in MacOSRoman already and the default encoding for TeXShop, out of the box (remember your TeXShop is set to defaults since it's new), has been UTF-8 Unicode for a while.

Second: to get started Open TeXShop without any files open. In the Source tab of TeXShop->Preferences set the default encoding to Western(Mac OS Roman). You will then be able to open you files and they, hopefully, will look fine.

Third: in each and every file you now open place the line % !TEX encoding = MacOSRoman near the top of your file. From then on TeXShop will always open those files in MacOSRoman even if you change the default.

Fourth: what ever you do do NOT change the \include[applemac]{inputenc} since that file is encoded that way.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .