add char_encoding and exapmle