0

One org-mode file started showing strange coding instead of spanish characters (á, é, ...). Instead of "Música" and "fotografía" it shows "M\303\272sica" and "fotograf\303\203\302\255a".

I'm using Spacemacs 0.200.13 on Emacs 26.3 in Linux Mint 19.2

I tried setting the coding in the file using:

% -- coding: utf-8 --

and now "Música" appears correctly, but "fotografía" now reads "fotografía".

I'd like to know where to set the coding correctly, if globally in .spacemacs or somewhere else, or inside the problematic file (no problems with other org files). And which coding to use for spanish.

4
  • Are the already available informations like ergoemacs File encoding FAQ or EmacsWiki Changing Encodings not sufficent?
    – jue
    Feb 12, 2020 at 20:53
  • i ended doing "query replace" on all the wrong characters, then set-buffer-file-coding-system to utf-8 and finally saving. when I reopened the file, it again contained bad coding (tried to opened with xed but it said file was corrupted) so I opened it one more time with emacs, replaced all the bad characters, copied everything to pastebin, then copied again to a new org file. it worked, but left me guessing what happened Feb 15, 2020 at 4:39
  • I had a similar problem (in French) and the following solved it: Option > Multilingual Environment > Set Language Environnement > UTF-8
    – Lgen
    Feb 17, 2020 at 8:21
  • Also you could have a look to: emacswiki.org/emacs/ChangingEncodings, especially the recode-region function which has been of help for me in the past.
    – Lgen
    Feb 17, 2020 at 8:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.