Next: , Previous: , Up: Non-ASCII Characters   [Contents][Index]


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 (see 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 (see 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.