Function: utf7-get-u16char-converter

utf7-get-u16char-converter is a byte-compiled function defined in utf7.el.gz.

Signature

(utf7-get-u16char-converter WHICH-WAY)

Documentation

Return a function to convert between UTF-16 and current character set.

Source Code

;; Defined in /usr/src/emacs/lisp/international/utf7.el.gz
(defun utf7-get-u16char-converter (which-way)
  "Return a function to convert between UTF-16 and current character set."
  (if utf7-utf-16-coding-system
      (if (eq which-way 'to-utf-16)
	  (lambda ()
	    (encode-coding-region (point-min) (point-max)
				  utf7-utf-16-coding-system))
	(lambda ()
	  (decode-coding-region (point-min) (point-max)
				utf7-utf-16-coding-system)))
    ;; Add test to check if we are really Latin-1.
    (if (eq which-way 'to-utf-16)
	'utf7-latin1-u16-char-converter
      'utf7-u16-latin1-char-converter)))