#StackBounty: #utf-8 #revert-buffer Revert buffer with coding system

Bounty: 50

Chances are that every time utf-coding should be activated by invoking ‘M-x revert-coding-system` , even though a long list of utf-prefer configuration:

(prefer-coding-system        'utf-8)
(set-terminal-coding-system  'utf-8)
(set-keyboard-coding-system  'utf-8)
(set-selection-coding-system 'utf-8)
(setq locale-coding-system   'utf-8)
(setq-default buffer-file-coding-system 'utf-8)

Try to automate the process by

;;Set buffer coding system
(add-hook 'org-mode-hook (lambda () (revert-buffer-with-coding-system  "utf-8")))

However, it does not work as expected.

What’s the problem with my function to to handle the revert-buffer-with-coding-system'


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.