set the auto character code