Move utf8 related functions to catacharset.cpp