changed from String charset name to Charset Object