Variable: locale-preferred-coding-systems

locale-preferred-coding-systems is a variable defined in mule-cmds.el.gz.

Value

((".*8859[-_]?1\\>" . iso-8859-1)
 (".*8859[-_]?2\\>" . iso-8859-2)
 (".*8859[-_]?3\\>" . iso-8859-3)
 (".*8859[-_]?4\\>" . iso-8859-4)
 (".*8859[-_]?9\\>" . iso-8859-9)
 (".*8859[-_]?14\\>" . iso-8859-14)
 (".*8859[-_]?15\\>" . iso-8859-15)
 (".*utf\\(?:-?8\\)?" . utf-8)
 (".*@euro" . iso-8859-15)
 ("koi8-?r" . koi8-r)
 ("koi8-?u" . koi8-u)
 ("tcvn" . tcvn)
 ("big5[-_]?hkscs" . big5-hkscs)
 ("big5" . big5)
 ("euc-?tw" . euc-tw)
 ("euc-?cn" . euc-cn)
 ("gb2312" . gb2312)
 ("gbk" . gbk)
 ("gb18030" . gb18030)
 ("ja.*[._]euc" . japanese-iso-8bit)
 ("ja.*[._]jis7" . iso-2022-jp)
 ("ja.*[._]pck" . japanese-shift-jis)
 ("ja.*[._]sjis" . japanese-shift-jis)
 ("jpn" . japanese-shift-jis))

Documentation

List of pairs of locale regexps and preferred coding systems.

The first element whose locale regexp matches the start of a downcased locale specifies the coding system to prefer when using that locale. This coding system is used if the locale specifies a specific charset.

Probably introduced at or before Emacs version 21.1.

Source Code

;; Defined in /usr/src/emacs/lisp/international/mule-cmds.el.gz
(defconst locale-preferred-coding-systems
  (purecopy
   '((".*8859[-_]?1\\>" . iso-8859-1)
     (".*8859[-_]?2\\>" . iso-8859-2)
     (".*8859[-_]?3\\>" . iso-8859-3)
     (".*8859[-_]?4\\>" . iso-8859-4)
     (".*8859[-_]?9\\>" . iso-8859-9)
     (".*8859[-_]?14\\>" . iso-8859-14)
     (".*8859[-_]?15\\>" . iso-8859-15)
     (".*utf\\(?:-?8\\)?" . utf-8)
     ;; utf-8@euro exists, so put this after utf-8.  (@euro really
     ;; specifies the currency, rather than the charset.)
     (".*@euro" . iso-8859-15)
     ("koi8-?r" . koi8-r)
     ("koi8-?u" . koi8-u)
     ("tcvn" . tcvn)
     ("big5[-_]?hkscs" . big5-hkscs)
     ("big5" . big5)
     ("euc-?tw" . euc-tw)
     ("euc-?cn" . euc-cn)
     ("gb2312" . gb2312)
     ("gbk" . gbk)
     ("gb18030" . gb18030)
     ("ja.*[._]euc" . japanese-iso-8bit)
     ("ja.*[._]jis7" . iso-2022-jp)
     ("ja.*[._]pck" . japanese-shift-jis)
     ("ja.*[._]sjis" . japanese-shift-jis)
     ("jpn" . japanese-shift-jis)   ; MS-Windows uses this.
     ))
  "List of pairs of locale regexps and preferred coding systems.
The first element whose locale regexp matches the start of a downcased locale
specifies the coding system to prefer when using that locale.
This coding system is used if the locale specifies a specific charset.")