Modifications to character set handling