Function: decode-char

decode-char is a function defined in charset.c.

Signature

(decode-char CHARSET CODE-POINT)

Documentation

Decode the pair of CHARSET and CODE-POINT into a character.

Return nil if CODE-POINT is not valid in CHARSET.

CODE-POINT may be a cons (HIGHER-16-BIT-VALUE . LOWER-16-BIT-VALUE), although this usage is obsolescent.

Probably introduced at or before Emacs version 23.1.

Source Code

// Defined in /usr/src/emacs/src/charset.c
{
  int c, id;
  unsigned code;
  struct charset *charsetp;

  CHECK_CHARSET_GET_ID (charset, id);
  code = cons_to_unsigned (code_point, UINT_MAX);
  charsetp = CHARSET_FROM_ID (id);
  c = DECODE_CHAR (charsetp, code);
  return (c >= 0 ? make_fixnum (c) : Qnil);
}