support delimiter and encode

Indentation level in this block is incorrect