Set default encoding when charset does't exist
Use map table between encoding and encoded value
Fix some bug