Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make emacs accept UTF-8 (uppercase) encoding?

The following specifies file's character encoding:

# -*- coding: utf-8 -*-

But the uppercase variant:

# -*- coding: UTF-8 -*-

produces:

Warning (mule): Invalid coding system `UTF-8' is specified for the current buffer/file by the :coding tag. It is highly recommended to fix it before writing to a file.

Version: GNU Emacs 23.3.1

UTF-8 is an official name for the utf-8 character encoding.

The obvious add-to-coding-system-list function doesn't apply in this case. How to make UTF-8 to be alias for utf-8 in the coding declaration?

like image 290
jfs Avatar asked Dec 25 '12 15:12

jfs


1 Answers

I think, that following code will help you:

(define-coding-system-alias 'UTF-8 'utf-8)
like image 109
Alex Ott Avatar answered Sep 17 '22 15:09

Alex Ott