Initial implementation of CHARCODE.