improve _name_chars debug option
incrementially improving encoding edge cases