fix charset bug for bmap