Function: locale-charset-match-p

locale-charset-match-p is a byte-compiled function defined in mule-cmds.el.gz.

Signature

(locale-charset-match-p CHARSET1 CHARSET2)

Documentation

Whether charset names (strings) CHARSET1 and CHARSET2 are equivalent.

Matching is done ignoring case and any hyphens and underscores in the names. E.g. ISO_8859-1 and iso88591 both match iso-8859-1.

Source Code

;; Defined in /usr/src/emacs/lisp/international/mule-cmds.el.gz
(defun locale-charset-match-p (charset1 charset2)
  "Whether charset names (strings) CHARSET1 and CHARSET2 are equivalent.
Matching is done ignoring case and any hyphens and underscores in the
names.  E.g. `ISO_8859-1' and `iso88591' both match `iso-8859-1'."
  (setq charset1 (replace-regexp-in-string "[-_]" "" charset1))
  (setq charset2 (replace-regexp-in-string "[-_]" "" charset2))
  (string-equal-ignore-case charset1 charset2))