added "charset" option instead of hard-coding it