Function: search-unencodable-char

search-unencodable-char is an interactive and byte-compiled function defined in mule-cmds.el.gz.

Signature

(search-unencodable-char CODING-SYSTEM)

Documentation

Search forward from point for a character that is not encodable.

It asks which coding system to check. If such a character is found, set point after that character. Otherwise, don't move point.

When called from a program, the value is the position of the unencodable character found, or nil if all characters are encodable.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/international/mule-cmds.el.gz
(defun search-unencodable-char (coding-system)
  "Search forward from point for a character that is not encodable.
It asks which coding system to check.
If such a character is found, set point after that character.
Otherwise, don't move point.

When called from a program, the value is the position of the unencodable
character found, or nil if all characters are encodable."
  (interactive
   (list (let ((default (or buffer-file-coding-system 'us-ascii)))
	   (read-coding-system (format-prompt "Coding-system" default)
                               default))))
  (let ((pos (unencodable-char-position (point) (point-max) coding-system)))
    (if pos
	(goto-char (1+ pos))
      (message "All following characters are encodable by %s" coding-system))
    pos))