fixed qp encoder & non-utf8 charset bug