move decodeBodyByCharset out