elisp: Scanning Charsets
32.8 Scanning for Character Sets
================================
Sometimes it is useful to find out which character set a particular
character belongs to. One use for this is in determining which coding
systems (Coding Systems) are capable of representing all of the
text in question; another is to determine the font(s) for displaying
that text.
-- Function: charset-after &optional pos
This function returns the charset of highest priority containing
the character at position POS in the current buffer. If POS is
omitted or ‘nil’, it defaults to the current value of point. If
POS is out of range, the value is ‘nil’.
-- Function: find-charset-region beg end &optional translation
This function returns a list of the character sets of highest
priority that contain characters in the current buffer between
positions BEG and END.
The optional argument TRANSLATION specifies a translation table to
use for scanning the text (Translation of Characters). If
it is non-‘nil’, then each character in the region is translated
through this table, and the value returned describes the translated
characters instead of the characters actually in the buffer.
-- Function: find-charset-string string &optional translation
This function returns a list of character sets of highest priority
that contain characters in STRING. It is just like
‘find-charset-region’, except that it applies to the contents of
STRING instead of part of the current buffer.