(defun-maybe charset-after (&optional pos)
"Return charset of a character in current buffer at position POS.
-If POS is nil, it defauls to the current point.
+If POS is nil, it defaults to the current point.
If POS is out of range, the value is nil.
\[Emacs 20.3 emulating function]"
(char-charset (char-after pos))