Character functions

First go at a full set of Unicode-aware character functions.