backwards compatbility for getCharset