clean up code
Do not use SneakyThrows.
[INCOMPATIBLE CHANGE] Modified characterEncoding related APIs.
I should set encoding information in object construction.