use r.encoding replace content's encoding, it should the same