I have a few org files encoded in UTF-8. Everything works fine, also with German umlaute (ä, ö, ü, ß). These files I sync with Git between different PCs (mostly running Debian). When I synced one of the files with a windows machine it showed strange encodings in my Debian machine.

Example should be:

via operations called „push“ and

But shows:

via operations called \342\200\236push\342\200\234 and

where \342 and all \XXX are counted as one character.

The characters which make problems are: Ä,ä,Ö,ö,Ü,ü,ß,„,“,/,–

I tried to encode with C-x C-m c <encoding> RET C-x C-w RET in UTF-8 but this produces the error, that it couldn't be encoded with UTF-8. I only can use raw-text or no-conversion.

What can I do to encode back to UTF-8?

Thanks for your help.

  • Have you considered revert-buffer-with-coding-system C-x C-m r utf-8 on the file? – Marco Wahl Apr 23 '18 at 18:41

Your problem is not one of encoding but one of decoding. Try C-x RET r utf-8 RET, which should re-decode your file as utf-8 rather than that which was used by default. I recommend you add a -*- coding: utf-8; -*- on the first line of your file to avoid those problems (alternatively, you can change your Windows's Emacs config so as to default to using utf-8 like Debian).

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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