Variable: latex-inputenc-coding-alist
latex-inputenc-coding-alist is a customizable variable defined in
latexenc.el.gz.
Value
(("ansinew" . windows-1252)
("applemac" . mac-roman)
("ascii" . us-ascii)
("cp1250" . windows-1250)
("cp1252" . windows-1252)
("cp1257" . cp1257)
("cp437de" . cp437)
("cp437" . cp437)
("cp850" . cp850)
("cp852" . cp852)
("cp858" . cp858)
("cp865" . cp865)
("latin1" . iso-8859-1)
("latin2" . iso-8859-2)
("latin3" . iso-8859-3)
("latin4" . iso-8859-4)
("latin5" . iso-8859-9)
("latin9" . iso-8859-15)
("latin10" . iso-8859-16)
("next" . next)
("utf8" . utf-8)
("utf8x" . utf-8))
Documentation
Mapping from LaTeX encodings in "inputenc.sty" to Emacs coding systems.
LaTeX encodings are specified with "\\usepackage[encoding]{inputenc}".
Used by the function latexenc-find-file-coding-system.
Source Code
;; Defined in /usr/src/emacs/lisp/international/latexenc.el.gz
;;; latexenc.el --- guess correct coding system in LaTeX files -*- lexical-binding: t; -*-
;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
;; Author: Arne Jørgensen <arne@arnested.dk>
;; Keywords: mule, coding system, latex
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; This code tries to guess the correct coding system of a LaTeX file.
;; First it searches for a \inputencoding{...} or
;; \usepackage[...]{inputenc} line in the file and looks up the ... in
;; `latex-inputenc-coding-alist' to find the corresponding coding
;; system.
;; If this fails it will search for AUCTeX's TeX-master or tex-mode's
;; tex-main-file variable in the local variables section and visit
;; that file to get the coding system from the master file. This check
;; can be disabled by setting `latexenc-dont-use-TeX-master-flag' to
;; t.
;; If we have still not found a coding system we will try to use the
;; standard tex-mode's `tex-guess-main-file' and get the coding system
;; from the main file. This check can be disabled by setting
;; `latexenc-dont-use-tex-guess-main-file-flag' to t.
;; The functionality is enabled by adding the function
;; `latexenc-find-file-coding-system' to `file-coding-system-alist'
;; like this
;; (add-to-list 'file-coding-system-alist
;; '("\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" . latexenc-find-file-coding-system))
;;; Code:
;;;###autoload
(defcustom latex-inputenc-coding-alist
(purecopy
'(("ansinew" . windows-1252) ; MS Windows ANSI encoding, extension of Latin-1
("applemac" . mac-roman)
("ascii" . us-ascii)
("cp1250" . windows-1250) ; MS Windows encoding, codepage 1250
("cp1252" . windows-1252) ; synonym of ansinew
("cp1257" . cp1257)
("cp437de" . cp437) ; IBM code page 437 (German version): 225 is \ss
("cp437" . cp437) ; IBM code page 437: 225 is \beta
("cp850" . cp850) ; IBM code page 850
("cp852" . cp852) ; IBM code page 852
("cp858" . cp858) ; IBM code page 850 but with a euro symbol
("cp865" . cp865) ; IBM code page 865
("latin1" . iso-8859-1)
("latin2" . iso-8859-2)
("latin3" . iso-8859-3)
("latin4" . iso-8859-4)
("latin5" . iso-8859-9)
("latin9" . iso-8859-15)
("latin10" . iso-8859-16)
;; ("macce" . undecided) ; Apple Central European
("next" . next) ; The Next encoding
("utf8" . utf-8)
("utf8x" . utf-8))) ; used by the Unicode LaTeX package
"Mapping from LaTeX encodings in \"inputenc.sty\" to Emacs coding systems.
LaTeX encodings are specified with \"\\usepackage[encoding]{inputenc}\".
Used by the function `latexenc-find-file-coding-system'."
:group 'files
:group 'mule
:type '(alist :key-type (string :tag "LaTeX input encoding")
:value-type (coding-system :tag "Coding system")))