Fix charset bug, deprecated the user define charset