add build_char_category
implement build_code_category