added encoding option for e doc