add multi encoding support