fix issue #21 charset detect error