charset functionality was borked in general case