Add charset support

Signed-off-by: coldnew <coldnew.tw@gmail.com>