Fix a problem with character sets