fixed errors related to charactor-encoding~