add Automatic recognition of character code